(bug 44024) ObjectCache changes break XCache 3.x support
authorBrent Garber <overlordq@gmail.com>
Sat, 19 Jan 2013 03:43:03 +0000 (03:43 +0000)
committerBrent Garber <overlordq@gmail.com>
Sat, 19 Jan 2013 03:43:03 +0000 (03:43 +0000)
Changes in the 1.20.x branch altered the add method to check for the return value of get against
false.  Xcache 3.x returns NULL for unset values and so this check was erroneously determining that
all values are set when they were not.

This was causing basic ObjectCache usage to fail.

Change-Id: I0975e5c6a60c2813dc2d02aca84245807b8fb828

includes/objectcache/XCacheBagOStuff.php

index f740ae8..2722e9c 100644 (file)
@@ -44,6 +44,8 @@ class XCacheBagOStuff extends BagOStuff {
                        } else {
                                $val = unserialize( $val );
                        }
+               } elseif ( is_null( $val ) ) {
+                       return false;
                }
 
                return $val;