[HttpKernel] ExceptionHandler is actually displaying PHP errors
Since even fatal errors are catched and turned into exceptions by ErrorHandler, all PHP errors can nicely be displayed by ExceptionHandler. There is no need to set display_errors to true anymore then. Partially fixes #6254 on github.
This commit is contained in:
parent
d665584de9
commit
5d98fb1248
@ -234,9 +234,6 @@ EOF;
|
||||
img { border: 0; }
|
||||
#sf-resetcontent { width:970px; margin:0 auto; }
|
||||
$css
|
||||
.xdebug-error {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -95,17 +95,18 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
||||
|
||||
public function init()
|
||||
{
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
if ($this->debug) {
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(-1);
|
||||
|
||||
DebugClassLoader::enable();
|
||||
ErrorHandler::register($this->errorReportingLevel);
|
||||
if ('cli' !== php_sapi_name()) {
|
||||
ExceptionHandler::register();
|
||||
}
|
||||
} else {
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_errors', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user