From 87ee1ea2b86740fc6a0104f165bebbe0b08b66ba Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 23 Feb 2024 11:13:23 -0500 Subject: [PATCH] [Config][Messenger][Security] Don't turn deprecations into exceptions when unserializing --- Firewall/ContextListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firewall/ContextListener.php b/Firewall/ContextListener.php index 9b3c129..06f2c39 100644 --- a/Firewall/ContextListener.php +++ b/Firewall/ContextListener.php @@ -301,7 +301,7 @@ private function safelyUnserialize(string $serializedToken) $token = null; $prevUnserializeHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { - if (__FILE__ === $file) { + if (__FILE__ === $file && !\in_array($type, [\E_DEPRECATED, \E_USER_DEPRECATED], true)) { throw new \ErrorException($msg, 0x37313BC, $type, $file, $line); }