Skip to content

Commit

Permalink
Merge pull request #1 from clockworkgeek/master
Browse files Browse the repository at this point in the history
Compatibility for PHP 5.3
  • Loading branch information
maderlock committed Apr 22, 2015
2 parents dd229a5 + 20585de commit 3681638
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 3681638

Please sign in to comment.