summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-07-01 16:34:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2007-07-01 16:34:20 +0200
commite59767e15f7dd511c341cef3683fe6a83fc7651b (patch)
tree3fc1bb3deec2bcd97ca14a43500e0df229a828c6 /includes
parent74351519c2b0fe4ecd2db0d6a932dc2f72960e12 (diff)
make sure to not throw a notice when data is not cached
Diffstat (limited to 'includes')
-rw-r--r--includes/BagOStuff.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/BagOStuff.php b/includes/BagOStuff.php
index 969450a5..d1c93c2a 100644
--- a/includes/BagOStuff.php
+++ b/includes/BagOStuff.php
@@ -519,7 +519,11 @@ class APCBagOStuff extends BagOStuff {
*/
class XCacheBagOStuff extends BagOStuff {
public function get( $key ) {
- return unserialize(xcache_get($key));
+ $val = xcache_get( $key );
+ if ( is_string( $val ) ) {
+ $val = unserialize( $val );
+ }
+ return $val;
}
public function set( $key, $value, $exptime = 0 ) {