[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:
Bilal Amarni 2012-12-10 18:52:47 +01:00
parent d665584de9
commit 5d98fb1248
2 changed files with 4 additions and 6 deletions

View File

@ -234,9 +234,6 @@ EOF;
img { border: 0; }
#sf-resetcontent { width:970px; margin:0 auto; }
$css
.xdebug-error {
display: none;
}
</style>
</head>
<body>

View File

@ -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', 1);
}
} else {
ini_set('display_errors', 0);
}
}