From 1128c8d56f666968bf0edd0fa886c84def000157 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 8 Jan 2015 07:33:38 -0500 Subject: [PATCH] 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 --- includes/objectcache/ObjectCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 " . -- 2.20.1