[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; }
|
img { border: 0; }
|
||||||
#sf-resetcontent { width:970px; margin:0 auto; }
|
#sf-resetcontent { width:970px; margin:0 auto; }
|
||||||
$css
|
$css
|
||||||
.xdebug-error {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -95,17 +95,18 @@ abstract class Kernel implements KernelInterface, TerminableInterface
|
|||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
ini_set('display_errors', 0);
|
||||||
|
|
||||||
if ($this->debug) {
|
if ($this->debug) {
|
||||||
ini_set('display_errors', 1);
|
|
||||||
error_reporting(-1);
|
error_reporting(-1);
|
||||||
|
|
||||||
DebugClassLoader::enable();
|
DebugClassLoader::enable();
|
||||||
ErrorHandler::register($this->errorReportingLevel);
|
ErrorHandler::register($this->errorReportingLevel);
|
||||||
if ('cli' !== php_sapi_name()) {
|
if ('cli' !== php_sapi_name()) {
|
||||||
ExceptionHandler::register();
|
ExceptionHandler::register();
|
||||||
|
} else {
|
||||||
|
ini_set('display_errors', 1);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
ini_set('display_errors', 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user