Skip to content

Commit f386f4e

Browse files
jamieburchellchriskacerguis
authored andcommitted
Don't attempt to lowercase a NULL
Fixes PHP 8.1 deprecation notice when trying to `strtolower` `NULL`
1 parent 4571473 commit f386f4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/RestController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,9 @@ protected function _detect_method()
834834
$method = $this->input->server('HTTP_X_HTTP_METHOD_OVERRIDE');
835835
}
836836

837-
$method = strtolower($method);
837+
if ($method !== null) {
838+
$method = strtolower($method);
839+
}
838840
}
839841

840842
if (empty($method)) {

0 commit comments

Comments
 (0)