Skip to content

Commit

Permalink
[Debug] workaround BC break in PHP 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 18, 2019
1 parent 2bf5da5 commit d8d43e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Symfony/Component/Debug/ErrorHandler.php
Expand Up @@ -382,6 +382,11 @@ private function reRegister($prev)
*/
public function handleError($type, $message, $file, $line)
{
// @deprecated to be removed in Symfony 5.0
if (\PHP_VERSION_ID >= 70300 && $message && '"' === $message[0] && 0 === strpos($message, '"continue') && preg_match('/^"continue(?: \d++)?" targeting switch is equivalent to "break(?: \d++)?"\. Did you mean to use "continue(?: \d++)?"\?$/', $message)) {
$type = E_DEPRECATED;
}

// Level is the current error reporting level to manage silent error.
$level = error_reporting();
$silenced = 0 === ($level & $type);
Expand Down

0 comments on commit d8d43e6

Please sign in to comment.