From 318e2344c0ebe19f693ca43291a70cb1e2ffc212 Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Tue, 26 Mar 2024 09:28:01 +0800 Subject: [PATCH] MDL-81353 auth_lti: fix str_contains usage in cookie_helper This failure was being masked by Symfony\Polyfill\Php80 during unit tests. --- auth/lti/classes/local/ltiadvantage/utility/cookie_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/lti/classes/local/ltiadvantage/utility/cookie_helper.php b/auth/lti/classes/local/ltiadvantage/utility/cookie_helper.php index 4a1d6189b48..e43695f9f14 100644 --- a/auth/lti/classes/local/ltiadvantage/utility/cookie_helper.php +++ b/auth/lti/classes/local/ltiadvantage/utility/cookie_helper.php @@ -276,9 +276,9 @@ final class cookie_helper { bool $casesensitive): bool { if ($casesensitive) { - return str_contains($headerstring, $attribute); + return strpos($headerstring, $attribute) !== false; } - return str_contains(strtolower($headerstring), strtolower($attribute)); + return strpos(strtolower($headerstring), strtolower($attribute)) !== false; } /**