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 607cd94

Browse filesBrowse files
Tweak error/exception handler registration
1 parent b6a5496 commit 607cd94
Copy full SHA for 607cd94

File tree

3 files changed

+14
-5
lines changed
Filter options

3 files changed

+14
-5
lines changed

‎src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,16 @@ class FrameworkBundle extends Bundle
9191
{
9292
public function boot()
9393
{
94-
ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true);
94+
if (class_exists(ErrorHandler::class, false)) {
95+
$handler = set_error_handler('var_dump');
96+
restore_error_handler();
97+
} else {
98+
$handler = ErrorHandler::register(null, false);
99+
}
100+
101+
if (\is_array($handler) && $handler[0] instanceof ErrorHandler) {
102+
$handler->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true);
103+
}
95104

96105
if ($this->container->getParameter('kernel.http_method_override')) {
97106
Request::enableHttpMethodParameterOverride();

‎src/Symfony/Component/Console/Application.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Application.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ public function run(?InputInterface $input = null, ?OutputInterface $output = nu
165165
}
166166
}
167167

168-
$this->configureIO($input, $output);
169-
170168
try {
169+
$this->configureIO($input, $output);
170+
171171
$exitCode = $this->doRun($input, $output);
172172
} catch (\Exception $e) {
173173
if (!$this->catchExceptions) {

‎src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct(?callable $exceptionHandler = null, ?LoggerInterface
5757
$deprecationLogger = $fileLinkFormat;
5858
}
5959

60-
$handler = set_exception_handler('is_int');
60+
$handler = set_exception_handler('var_dump');
6161
$this->earlyHandler = \is_array($handler) ? $handler[0] : null;
6262
restore_exception_handler();
6363

@@ -84,7 +84,7 @@ public function configure(?object $event = null)
8484
$this->firstCall = $this->hasTerminatedWithException = false;
8585
$hasRun = null;
8686

87-
$handler = set_exception_handler('is_int');
87+
$handler = set_exception_handler('var_dump');
8888
$handler = \is_array($handler) ? $handler[0] : null;
8989
restore_exception_handler();
9090

0 commit comments

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