Skip to content

Commit

Permalink
Ensure that array callable first element is an object, fixes #130
Browse files Browse the repository at this point in the history
  • Loading branch information
philipobenito committed May 10, 2017
1 parent 5ec434f commit 43f35ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ReflectionContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public function call(callable $callable, array $args = [])
}

if (is_array($callable)) {
if (is_string($callable[0])) {
$callable[0] = $this->getContainer()->get($callable[0]);
}

$reflection = new ReflectionMethod($callable[0], $callable[1]);

if ($reflection->isStatic()) {
Expand Down

0 comments on commit 43f35ab

Please sign in to comment.