Skip to content

Commit

Permalink
Don't attempt to lowercase a NULL
Browse files Browse the repository at this point in the history
Fixes PHP 8.1 deprecation notice when trying to `strtolower` `NULL`
  • Loading branch information
jamieburchell authored and chriskacerguis committed Feb 24, 2022
1 parent 4571473 commit f386f4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,9 @@ protected function _detect_method()
$method = $this->input->server('HTTP_X_HTTP_METHOD_OVERRIDE');
}

$method = strtolower($method);
if ($method !== null) {
$method = strtolower($method);
}
}

if (empty($method)) {
Expand Down

0 comments on commit f386f4e

Please sign in to comment.