Skip to content

Commit

Permalink
Update AltoRouter.php
Browse files Browse the repository at this point in the history
Check $request is empty string or not
  • Loading branch information
AliAzizi authored Feb 22, 2020
1 parent 6ffb025 commit 4efac02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AltoRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function match($requestUrl = null, $requestMethod = null)
$requestUrl = substr($requestUrl, 0, $strpos);
}

$lastRequestUrlChar = $requestUrl[strlen($requestUrl)-1];
$lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';

// set Request Method if it isn't passed as a parameter
if ($requestMethod === null) {
Expand Down

0 comments on commit 4efac02

Please sign in to comment.