From e5daa18047eebafd0c739c1c175d7eebe3507984 Mon Sep 17 00:00:00 2001 From: Mike Kruk Date: Wed, 28 May 2014 14:03:14 -0400 Subject: [PATCH] fixed a bug where setting an environment config via magic method (i.e. scm('svn')) where an instance variable already existed would fail. #53 --- lib/Pomander/Environment.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Pomander/Environment.php b/lib/Pomander/Environment.php index b2eaa90..bcb5142 100644 --- a/lib/Pomander/Environment.php +++ b/lib/Pomander/Environment.php @@ -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; }