From 35421c275aaec0629e52299333137a65db66eb38 Mon Sep 17 00:00:00 2001 From: Pierre Le Corre Date: Wed, 18 Oct 2023 09:35:06 +0200 Subject: [PATCH] Fix deprecation PHP : strtolower null argument [2023-10-18 07:23:48] php.INFO: Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated {"exception":"[object] (ErrorException(code: 0): Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated at /var/www/html/src/Services/Oai/OaiService.php:51)"} [] --- symfony/src/Services/Oai/OaiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symfony/src/Services/Oai/OaiService.php b/symfony/src/Services/Oai/OaiService.php index 2bf2362..a2b17cd 100644 --- a/symfony/src/Services/Oai/OaiService.php +++ b/symfony/src/Services/Oai/OaiService.php @@ -48,7 +48,7 @@ public function __construct( */ public function getVerb(Request $request): OaiVerbInterface { - if (!isset($this->classesVerb[strtolower($request->get('verb'))])) { + if ($request->get('verb') === null || !isset($this->classesVerb[strtolower($request->get('verb'))])) { return (new BadVerb())->setRequest($request); }