Skip to content

Commit

Permalink
Make sure array is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Zukowski committed Jul 29, 2015
1 parent 3108949 commit 7c6375b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/Instantiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

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

Expand Down

0 comments on commit 7c6375b

Please sign in to comment.