Skip to content

Commit

Permalink
Better check to determine if routing to a closure. Fixes #136
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Jul 1, 2016
1 parent ab76571 commit 624a68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ protected function startController()
$this->benchmark->start('controller_constructor');

// Is it routed to a Closure?
if (is_callable($this->controller))
if (is_object($this->controller) && ($this->controller instanceof Closure))
{
$controller = $this->controller;
echo $controller(...$this->router->params());
Expand Down

0 comments on commit 624a68e

Please sign in to comment.