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); }