Commit 931e6cf5 authored by catch's avatar catch

Issue #1048546: Invalid argument supplied for foreach() in MemCacheDrupal->getMultiple().

parent 04d827cb
...@@ -137,6 +137,11 @@ function dmemcache_get_multi($keys, $bin = 'cache', $mc = NULL) { ...@@ -137,6 +137,11 @@ function dmemcache_get_multi($keys, $bin = 'cache', $mc = NULL) {
$values[] = isset($results[$key]) ? '1': '0'; $values[] = isset($results[$key]) ? '1': '0';
$_memcache_statistics[] = $values; $_memcache_statistics[] = $values;
} }
// If $results is FALSE, convert it to an empty array.
if (!$results) {
$results = array();
}
return $results; return $results;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment