Skip to content

Commit d8d43e6

Browse files
[Debug] workaround BC break in PHP 7.3
1 parent 2bf5da5 commit d8d43e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,11 @@ private function reRegister($prev)
382382
*/
383383
public function handleError($type, $message, $file, $line)
384384
{
385+
// @deprecated to be removed in Symfony 5.0
386+
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)) {
387+
$type = E_DEPRECATED;
388+
}
389+
385390
// Level is the current error reporting level to manage silent error.
386391
$level = error_reporting();
387392
$silenced = 0 === ($level & $type);

0 commit comments

Comments
 (0)