From 7c6375bc32079341c3728fe32032c621ed99e90e Mon Sep 17 00:00:00 2001 From: Michal Zukowski Date: Wed, 29 Jul 2015 10:00:27 +0200 Subject: [PATCH] Make sure array is passed --- src/Service/Instantiator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/Instantiator.php b/src/Service/Instantiator.php index f3d0ca0..35584a8 100644 --- a/src/Service/Instantiator.php +++ b/src/Service/Instantiator.php @@ -64,7 +64,7 @@ protected function injectMethods($object, ChangeSet $changeSet) $value = $injection->getValue($this->serviceLocator); if ($changeSet->isMethodPublic($methodName)) { - call_user_func_array([$object, $methodName], $value); + call_user_func_array([$object, $methodName], (array)$value); continue; } @@ -86,7 +86,7 @@ protected function createObject(ChangeSet $changeSet) $reflection = new \ReflectionClass($fqcn); return $reflection->newInstanceArgs( - $changeSet->getConstructorInjections()->getValue($this->serviceLocator) + (array)$changeSet->getConstructorInjections()->getValue($this->serviceLocator) ); }