From: Brad Jorsch Date: Thu, 8 Jan 2015 12:33:38 +0000 (-0500) Subject: Allow CACHE_NONE as a fallback for ObjectCache::newAccelerator X-Git-Tag: 1.31.0-rc.0~12762 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=1128c8d56f666968bf0edd0fa886c84def000157;p=lhc%2Fweb%2Fwiklou.git Allow CACHE_NONE as a fallback for ObjectCache::newAccelerator Test for null specifically rather than falsiness, because CACHE_NONE is 0. Bug: T86162 Change-Id: I98b9da42c6a5fd6cdf721cdbd5473a5e959581b8 --- diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index 633b34a2c9..62856f907f 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -135,7 +135,7 @@ class ObjectCache { } elseif ( function_exists( 'wincache_ucache_get' ) ) { $id = 'wincache'; } else { - if ( $fallback ) { + if ( $fallback !== null ) { return self::newFromId( $fallback ); } throw new MWException( "CACHE_ACCEL requested but no suitable object " .