mirror of
https://github.com/dannyvankooten/AltoRouter.git
synced 2025-08-04 15:37:45 +02:00
update docs to make sure is an array
This commit is contained in:
@@ -26,7 +26,7 @@ $router->map( 'GET', '/user/[i:id]/', function( $id ) {
|
||||
$match = $router->match();
|
||||
|
||||
// call closure or throw 404 status
|
||||
if( $match && is_callable( $match['target'] ) ) {
|
||||
if( is_array($match) && is_callable( $match['target'] ) ) {
|
||||
call_user_func_array( $match['target'], $match['params'] );
|
||||
} else {
|
||||
// no route was matched
|
||||
|
Reference in New Issue
Block a user