Skip to content

Commit

Permalink
Merge pull request #54 from tamagokun/patch_environment_set_bug
Browse files Browse the repository at this point in the history
fixed a bug where setting an environment config via magic method (i.e.
  • Loading branch information
tamagokun committed May 28, 2014
2 parents 0bac71b + e5daa18 commit b5fcc3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Pomander/Environment.php
Expand Up @@ -50,7 +50,11 @@ public function setup()

public function __call($name, $arguments)
{
$this->$name = array_shift($arguments);
if (array_key_exists($name, get_object_vars($this))) {
$this->config[$name] = array_shift($arguments);
} else {
$this->$name = array_shift($arguments);
}

return $this;
}
Expand Down

0 comments on commit b5fcc3d

Please sign in to comment.