From 05a519ecc5c8f68e049b68714c2ea60d9abd0e54 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 1 Jun 2018 15:38:53 +1200 Subject: [PATCH] Fix code style / php 5.3 compat --- cache/Cache.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cache/Cache.php b/cache/Cache.php index 1f67592ac..cf5518c2f 100644 --- a/cache/Cache.php +++ b/cache/Cache.php @@ -175,8 +175,8 @@ class SS_Cache { $backend = self::$backends[$backend_name]; $basicOptions = array( - 'cache_id_prefix' => md5(BASE_PATH) . '_' . $for . '_', - ); + 'cache_id_prefix' => md5(BASE_PATH) . '_' . $for . '_', + ); if ($cache_lifetime >= 0) { $basicOptions['lifetime'] = $cache_lifetime; @@ -188,14 +188,14 @@ class SS_Cache { require_once 'Zend/Cache.php'; - $cache = Zend_Cache::factory( - $frontend, $backend[0], $frontendOptions, $backend[1] - ); + $cache = Zend_Cache::factory( + $frontend, $backend[0], $frontendOptions, $backend[1] + ); - if (isset($frontendOptions['disable-segmentation']) && $frontendOptions['disable-segmentation']) { - return $cache; - } + if (!empty($frontendOptions['disable-segmentation'])) { + return $cache; + } - return Injector::inst()->createWithArgs('CacheProxy', [$cache]); + return Injector::inst()->createWithArgs('CacheProxy', array($cache)); } }