From d587b4ba1a8e7928cfd5541b8e671dc8327245da Mon Sep 17 00:00:00 2001 From: Tomasz Narloch Date: Mon, 15 Aug 2016 22:52:34 +0200 Subject: [PATCH] Revert ternary operator --- libraries/joomla/cache/storage/memcache.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libraries/joomla/cache/storage/memcache.php b/libraries/joomla/cache/storage/memcache.php index e9bf2f027cba3..a8ad0d24afcb6 100644 --- a/libraries/joomla/cache/storage/memcache.php +++ b/libraries/joomla/cache/storage/memcache.php @@ -177,7 +177,11 @@ public function store($id, $group, $data) } $index = static::$_db->get($this->_hash . '-index'); - $index = $index ? $index : array(); + + if ($index === false) + { + $index = array(); + } $tmparr = new stdClass; $tmparr->name = $cache_id; @@ -212,7 +216,11 @@ public function remove($id, $group) } $index = static::$_db->get($this->_hash . '-index'); - $index = $index ? $index : array(); + + if ($index === false) + { + $index = array(); + } foreach ($index as $key => $value) {