Skip to content

Commit

Permalink
Merge pull request #247 from aliazizi/patch-1
Browse files Browse the repository at this point in the history
Check for empty request URI, thank you @AliAzizi
  • Loading branch information
dannyvankooten authored Mar 9, 2020
2 parents 6ffb025 + 4efac02 commit f6fede4
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 f6fede4

Please sign in to comment.