Commit 57f44554 authored by catch's avatar catch

Issue #1244296 by das-peter: fix strict warning from reset().

parent 7464fa39
......@@ -296,7 +296,11 @@ class MemCacheDrupal implements DrupalCacheInterface {
}
if ($flush) {
$key_length = isset($this->wildcard_flushes[$this->bin]) ? strlen(reset(array_keys($this->wildcard_flushes[$this->bin]))) : $length;
$key_length = $length;
if (isset($this->wildcard_flushes[$this->bin])) {
$keys = array_keys($this->wildcard_flushes[$this->bin]);
$key_length = strlen(reset($keys));
}
$key = substr($cid, 0, $key_length);
// Avoid too many calls to variable_set() by only recording a flush for
// a fraction of the wildcard invalidation variable, per cid length.
......
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