Skip to content

Commit

Permalink
Check if method exists before reflection
Browse files Browse the repository at this point in the history
Fixes barryvdh#391 (when using __call())
  • Loading branch information
barryvdh committed Aug 28, 2015
1 parent 558938b commit cf9d01a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataCollector/IlluminateRouteCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function getRouteInformation($route)

if (isset($action['controller']) && strpos($action['controller'], '@') !== false) {
list($controller, $method) = explode('@', $action['controller']);
if(class_exists($controller)) {
if(class_exists($controller) && method_exists($controller, $method)) {
$reflector = new \ReflectionMethod($controller, $method);
}
unset($result['uses']);
Expand Down

0 comments on commit cf9d01a

Please sign in to comment.