From cc0a51fd393295d49e32a823709555c171d5efc9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 23 Apr 2014 14:18:24 +0000 Subject: [PATCH] Don't die on empty keys in MWMemcached Bug: 64287 Change-Id: Iedfec96286212577a181b83957cdc4545be206d2 --- includes/objectcache/MemcachedClient.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/objectcache/MemcachedClient.php b/includes/objectcache/MemcachedClient.php index 9de840b62c..7990053de3 100644 --- a/includes/objectcache/MemcachedClient.php +++ b/includes/objectcache/MemcachedClient.php @@ -419,6 +419,12 @@ class MWMemcached { $this->_debugprint( "get($key)\n" ); } + if ( !is_array( $key ) && strval( $key ) === '' ) { + $this->_debugprint( "Skipping key which equals to an empty string" ); + wfProfileOut( __METHOD__ ); + return false; + } + if ( !$this->_active ) { wfProfileOut( __METHOD__ ); return false; -- 2.20.1