merged branch bamarni/display-errors (PR #6259)

This PR was merged into the master branch.

Commits
-------

5d98fb1 [HttpKernel] ExceptionHandler is actually displaying PHP errors

Discussion
----------

[HttpKernel] ExceptionHandler is actually displaying all PHP errors

So there is no need to set display_errors to true in that case.

Partially fixes #6254.
This commit is contained in:
Fabien Potencier 2012-12-11 10:05:21 +01:00
commit de44087bfd
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);
}
}