diff --git a/inc/compatibility.php b/inc/compatibility.php index b60704f298..4270c5d1f3 100644 --- a/inc/compatibility.php +++ b/inc/compatibility.php @@ -105,7 +105,7 @@ function str_starts_with(?string $haystack, ?string $needle) if (!function_exists('str_contains')) { function str_contains(?string $haystack, ?string $needle) { - return '' === $needle || false !== strpos($haystack, $needle); + return '' === $needle || false !== strpos($haystack, (string) $needle); } }