objectcache: fix WinCacheBagOStuf::doGet() is_string() check
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 18 Jul 2019 05:50:14 +0000 (22:50 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 18 Jul 2019 05:50:14 +0000 (22:50 -0700)
Allow integers to so that incr() and other cases work. This class
now passes all the unit tests again.

Change-Id: Ie7aae36180472a0e913fb8275bccee3fbc6fe7d9

includes/libs/objectcache/WinCacheBagOStuff.php

index d75b344..23da0bb 100644 (file)
@@ -32,7 +32,7 @@ class WinCacheBagOStuff extends BagOStuff {
                $casToken = null;
 
                $blob = wincache_ucache_get( $key );
-               if ( !is_string( $blob ) ) {
+               if ( !is_string( $blob ) && !is_int( $blob ) ) {
                        return false;
                }