Skip to content

Commit b5fcc3d

Browse files
committed
Merge pull request #54 from tamagokun/patch_environment_set_bug
fixed a bug where setting an environment config via magic method (i.e.
2 parents 0bac71b + e5daa18 commit b5fcc3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Pomander/Environment.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public function setup()
5050

5151
public function __call($name, $arguments)
5252
{
53-
$this->$name = array_shift($arguments);
53+
if (array_key_exists($name, get_object_vars($this))) {
54+
$this->config[$name] = array_shift($arguments);
55+
} else {
56+
$this->$name = array_shift($arguments);
57+
}
5458

5559
return $this;
5660
}

0 commit comments

Comments
 (0)