Skip to content

Commit 60da862

Browse files
author
Daniel Khalil
committed
fix(router): fixed PHP notice when endpoint class check returns false
#4
1 parent 4ef2514 commit 60da862

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Bacon/Router.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public function parse ()
6060

6161
$namespace_next = $namespace . '\\' . ucfirst($next);
6262

63-
if (in_array('Bacon\Controllers\Endpoint', class_implements($namespace))) {
63+
$endpoint_check = class_implements($namespace);
64+
65+
if ($endpoint_check != false && in_array('Bacon\Controllers\Endpoint', $endpoint_check)) {
6466
$this->route->push(ucfirst($current));
6567
$this->set_action();
6668

0 commit comments

Comments
 (0)