summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Andrews2017-03-29 00:23:42 (GMT)
committerJeremy Andrews2017-03-29 00:23:42 (GMT)
commit28c225009ef1e7fd179238678c29954ef26f3218 (patch)
tree3fb8e54b00e6b968a376edd8c6342e88c081a883
parent25224fbc5486e14bbfeafc324d41fea7fb4ade04 (diff)
Issue #2864451 by xdevx, Jeremy: Warning: Cannot use a scalar value as an array in
-rw-r--r--dmemcache.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/dmemcache.inc b/dmemcache.inc
index f598284..cb587f3 100644
--- a/dmemcache.inc
+++ b/dmemcache.inc
@@ -1103,6 +1103,9 @@ function dmemcache_piece_cache_set($cid, $exp = NULL) {
// Always refresh cached copy to minimize multi-thread race window.
$piece_cache = &drupal_static('dmemcache_piece_cache', array());
$piece_cache = dmemcache_get('__dmemcache_piece_cache');
+ if (!is_array($piece_cache)) {
+ $piece_cache = array();
+ }
if (isset($exp)) {
if ($exp <= 0) {