We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7049eaa commit 85722acCopy full SHA for 85722ac
cache.php
@@ -177,6 +177,9 @@ function memcache_mem( $key ) {
177
if( $key == 'hash' )
178
$key = 'hash_bytes';
179
180
+ if (!is_array($memcache_stats))
181
+ return 0;
182
+
183
$result = 0;
184
foreach( $memcache_stats as $server )
185
$result += empty($server[$key]) ? 0 : $server[$key];
@@ -215,6 +218,9 @@ function memcache_ref() {
215
218
216
219
$items = $memcache->getAllKeys();
217
220
221
+ if (!is_array($items))
222
+ return array();
223
224
$keys = array();
225
foreach( $items as $item ) {
226
$keys[$item] = memcache_get_key($item);
0 commit comments