Skip to content

Commit cf9d01a

Browse files
committed
Check if method exists before reflection
Fixes barryvdh#391 (when using __call())
1 parent 558938b commit cf9d01a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataCollector/IlluminateRouteCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function getRouteInformation($route)
6060

6161
if (isset($action['controller']) && strpos($action['controller'], '@') !== false) {
6262
list($controller, $method) = explode('@', $action['controller']);
63-
if(class_exists($controller)) {
63+
if(class_exists($controller) && method_exists($controller, $method)) {
6464
$reflector = new \ReflectionMethod($controller, $method);
6565
}
6666
unset($result['uses']);

0 commit comments

Comments
 (0)