From c4fc988c8c27d9a7b334e00da1ef4d458859903a Mon Sep 17 00:00:00 2001 From: Holger Kreis <holger@markaspot.org> Date: Wed, 22 Mar 2023 17:07:10 +0100 Subject: [PATCH] Issue #3349163 by nicxvan, markaspot: Deprecated use of strstr Switch to str_contains with null coalescing operator (??) --- src/Authentication/Provider/ApiKeyAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Authentication/Provider/ApiKeyAuth.php b/src/Authentication/Provider/ApiKeyAuth.php index c2ed495..923439c 100644 --- a/src/Authentication/Provider/ApiKeyAuth.php +++ b/src/Authentication/Provider/ApiKeyAuth.php @@ -123,7 +123,7 @@ class ApiKeyAuth implements AuthenticationProviderInterface { public function getKey(Request $request) { // Exempt edit/delete form route. $route_name = $this->currentRouteMatch->getRouteName(); - if (strstr($route_name, 'entity.api_key')) { + if (str_contains($route_name ?? '', 'entity.api_key')) { return FALSE; } -- GitLab