Skip to content

Commit

Permalink
Added return for __call method.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterborodatyy committed Apr 2, 2017
1 parent e7be818 commit d3b5cc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Core/DispatcherLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function __call($name, $args) {
throw new Exception('Method is undefined.');
}

$args = $args[0];
$args = array_shift($args);

if(!empty($this->_subscribers[$name.':before'])) {
foreach ($this->_subscribers[$name.':before'] as $subscriber) {
Expand All @@ -28,6 +28,8 @@ public function __call($name, $args) {
$subscriber($response);
}
}

return $response;
}

public function register($event, callable $callback) {
Expand Down

0 comments on commit d3b5cc2

Please sign in to comment.