Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c6da5e

Browse filesBrowse files
bug #53967 [ErrorHandler] return the unchanged text if preg_replace_callback() fails (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [ErrorHandler] return the unchanged text if preg_replace_callback() fails | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #51290 | License | MIT Commits ------- db47893 return the unchanged text if preg_replace_callback() fails
2 parents 45c63b2 + db47893 commit 9c6da5e
Copy full SHA for 9c6da5e

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ErrorHandler/ErrorRenderer/HtmlErrorRenderer.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ private function formatFileFromText(string $text)
329329
{
330330
return preg_replace_callback('/in ("|")?(.+?)\1(?: +(?:on|at))? +line (\d+)/s', function ($match) {
331331
return 'in '.$this->formatFile($match[2], $match[3]);
332-
}, $text);
332+
}, $text) ?? $text;
333333
}
334334

335335
private function formatLogMessage(string $message, array $context)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.