From f386f4e0013daadaa213681a0a41af69aa81d9de Mon Sep 17 00:00:00 2001 From: Jamie Burchell Date: Wed, 23 Feb 2022 14:52:03 +0000 Subject: [PATCH] Don't attempt to lowercase a NULL Fixes PHP 8.1 deprecation notice when trying to `strtolower` `NULL` --- src/RestController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/RestController.php b/src/RestController.php index 9ab38913..0e0aa4bc 100644 --- a/src/RestController.php +++ b/src/RestController.php @@ -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)) {