From a1569ad33b422ae5ac63dd933daf1fe12c58e6c1 Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Tue, 19 Feb 2019 10:16:08 +0100 Subject: [PATCH] update docs to make sure is an array --- usage/processing-requests.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/processing-requests.html b/usage/processing-requests.html index 3e76d50..48c6ab7 100644 --- a/usage/processing-requests.html +++ b/usage/processing-requests.html @@ -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