Skip to content

Commit

Permalink
fix: improve codition
Browse files Browse the repository at this point in the history
  • Loading branch information
ipranjal committed Sep 10, 2024
1 parent 9dab947 commit 07d0edd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RouterEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private function getArguments(string $controller, string $method): bool|array

private function checkMethodNotAllowed($controller): bool
{
if(!isset($this->pathInfo[1]) || is_null($this->pathInfo[1])){
if(!isset($this->pathInfo[1])){
return false;
}
if ( method_exists($controller, 'get' . ucfirst($this->pathInfo[1])) || method_exists($controller, 'post' . ucfirst($this->pathInfo[1])) || method_exists($controller, 'put' . ucfirst($this->pathInfo[1])) || method_exists($controller, 'delete' . ucfirst($this->pathInfo[1]))) {
Expand Down

0 comments on commit 07d0edd

Please sign in to comment.