From 20585deda45bb14282f0e437f44253c6191b6e45 Mon Sep 17 00:00:00 2001 From: Daniel Deady Date: Fri, 20 Mar 2015 12:31:46 +0000 Subject: [PATCH] Compatibility for PHP 5.3 Function array dereferencing is not backward compatible so has been removed. --- .../code/local/C3/EnvironmentBanner/Helper/Data.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/public_html/app/code/local/C3/EnvironmentBanner/Helper/Data.php b/src/public_html/app/code/local/C3/EnvironmentBanner/Helper/Data.php index c02e4af..2c2a598 100755 --- a/src/public_html/app/code/local/C3/EnvironmentBanner/Helper/Data.php +++ b/src/public_html/app/code/local/C3/EnvironmentBanner/Helper/Data.php @@ -29,7 +29,8 @@ public function isDisplayFrontendBanner() } // Check that the given environment is recognised, else false - if (!isset($this->getEnvironments()[$this->getEnvironment()])) { + $environments = $this->getEnvironments(); + if (!isset($environments[$this->getEnvironment()])) { return false; } @@ -55,7 +56,8 @@ public function isDisplayAdminBanner() } // Check that the given environment is recognised, else false - if (!isset($this->getEnvironments()[$this->getEnvironment()])) { + $environments = $this->getEnvironments(); + if (!isset($environments[$this->getEnvironment()])) { return false; } @@ -97,10 +99,11 @@ public function getEnvColours() { // Lazily load colours from environment data if ($this->_colours === null) { - if (!isset($this->getEnvironments()[$this->getEnvironment()])) { + $environments = $this->getEnvironments(); + if (!isset($environments[$this->getEnvironment()])) { return null; } - $data = $this->getEnvironments()[$this->getEnvironment()]; + $data = $environments[$this->getEnvironment()]; $this->_colours = Mage::getModel('c3_environmentbanner/colours') ->setData($data); }