minor #38033 Remove unnecessary silence operator (alexpott)

This PR was merged into the 5.2-dev branch.

Discussion
----------

Remove unnecessary silence operator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

A gobble-all-errors handler was added around the unserialize() call making the @ operator unnecessary.

Commits
-------

03201f0d23 No longer need to silence errors as we're catching them all
This commit is contained in:
Fabien Potencier 2020-09-02 13:03:38 +02:00
commit dad4e956c9

View File

@ -61,7 +61,7 @@ class Deprecation
$this->triggeringFile = $file;
if (isset($line['object']) || isset($line['class'])) {
set_error_handler(function () {});
$parsedMsg = @unserialize($this->message);
$parsedMsg = unserialize($this->message);
restore_error_handler();
if ($parsedMsg && isset($parsedMsg['deprecation'])) {
$this->message = $parsedMsg['deprecation'];