From 2d713eafd744d97b21ccb071bb2f55c78d840851 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 14 Nov 2024 09:07:34 +0100 Subject: [PATCH] fix compatibility with PHP < 8.2.4 --- .../Constraints/NoSuspiciousCharactersValidator.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharactersValidator.php b/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharactersValidator.php index d82a62d57dd60..0b7a78ef92e40 100644 --- a/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharactersValidator.php +++ b/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharactersValidator.php @@ -99,7 +99,17 @@ public function validate(mixed $value, Constraint $constraint): void } foreach (self::CHECK_ERROR as $check => $error) { - if (!($errorCode & $check)) { + if (\PHP_VERSION_ID < 80204) { + if (!($checks & $check)) { + continue; + } + + $checker->setChecks($check); + + if (!$checker->isSuspicious($value)) { + continue; + } + } elseif (!($errorCode & $check)) { continue; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy