Skip to content

Commit 4e85943

Browse files
authored
Merge pull request #19 from JorgenEvens/chore/memcache-fixes
[memcached] add fixes for memcached
2 parents 2679261 + 85722ac commit 4e85943

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cache.php

+6
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ function memcache_mem( $key ) {
224224
if( $key == 'hash' )
225225
$key = 'hash_bytes';
226226

227+
if (!is_array($memcache_stats))
228+
return 0;
229+
227230
$result = 0;
228231
foreach( $memcache_stats as $server )
229232
$result += empty($server[$key]) ? 0 : $server[$key];
@@ -262,6 +265,9 @@ function memcache_ref() {
262265

263266
$items = $memcache->getAllKeys();
264267

268+
if (!is_array($items))
269+
return array();
270+
265271
$keys = array();
266272
foreach( $items as $item ) {
267273
$keys[$item] = memcache_get_key($item);

0 commit comments

Comments
 (0)