From 71d605e0f6e707324a7789608c4ada5d92af834e Mon Sep 17 00:00:00 2001 From: Elias Luhr Date: Thu, 7 Dec 2023 11:10:46 +0100 Subject: [PATCH] Update PasswordInputHelper.php Type error fix for PHP <8.2 --- src/helpers/PasswordInputHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/PasswordInputHelper.php b/src/helpers/PasswordInputHelper.php index f0b3aad..f64c905 100644 --- a/src/helpers/PasswordInputHelper.php +++ b/src/helpers/PasswordInputHelper.php @@ -23,11 +23,11 @@ class PasswordInputHelper * @param string $pattern * @return bool */ - public static function patternMatches($text, string $pattern): bool + public static function patternMatches(?string $text, string $pattern): bool { $index = md5($pattern . $text); if (!isset(self::$_matches[$index])) { - self::$_matches[$index] = preg_match($pattern, $text) === 1; + self::$_matches[$index] = preg_match($pattern, (string)$text) === 1; } return self::$_matches[$index]; }