Skip to content

Commit f8f6176

Browse files
Merge branch '5.4' into 6.0
* 5.4: [DependencyInjection] Add `SubscribedService` attribute, deprecate current `ServiceSubscriberTrait` usage Use try/finally to restore error handlers Allow serializer default context configuration
2 parents 2a5e310 + 9093fa6 commit f8f6176

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

DeprecationErrorHandler/Deprecation.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ public function __construct($message, array $trace, $file)
102102
}
103103

104104
set_error_handler(function () {});
105-
$parsedMsg = unserialize($this->message);
106-
restore_error_handler();
105+
try {
106+
$parsedMsg = unserialize($this->message);
107+
} finally {
108+
restore_error_handler();
109+
}
107110
if ($parsedMsg && isset($parsedMsg['deprecation'])) {
108111
$this->message = $parsedMsg['deprecation'];
109112
$this->originClass = $parsedMsg['class'];

0 commit comments

Comments
 (0)