Skip to content

Commit

Permalink
Ensure the class exists before trying to register its routes
Browse files Browse the repository at this point in the history
See #90
  • Loading branch information
lorisleiva committed Mar 30, 2021
1 parent d4e905e commit 9e7e4e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ActionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ public function registerRoutes($paths = 'app/Actions'): void

public function registerRoutesForAction(string $className): void
{
if (! class_exists($className)) {
return;
}

if (! in_array(AsController::class, class_uses_recursive($className))) {
return;
}
Expand Down

0 comments on commit 9e7e4e7

Please sign in to comment.