Skip to content

Commit 87ee1ea

Browse files
[Config][Messenger][Security] Don't turn deprecations into exceptions when unserializing
1 parent 43c6218 commit 87ee1ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ private function safelyUnserialize(string $serializedToken)
301301
$token = null;
302302
$prevUnserializeHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback');
303303
$prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) {
304-
if (__FILE__ === $file) {
304+
if (__FILE__ === $file && !\in_array($type, [\E_DEPRECATED, \E_USER_DEPRECATED], true)) {
305305
throw new \ErrorException($msg, 0x37313BC, $type, $file, $line);
306306
}
307307

0 commit comments

Comments
 (0)