Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow people to set the error level, this is especially important whe…
…n dealing with misbehaving libraries as part of legacy integrations.

Usage would be to extend the Kernel, and set the errorReportingLevel prior to calling parent::__construct(). Not ideal, but this doesn't break BC and allows the user to defer the decision as late as possible. This can/should be handled better in 2.1.x
  • Loading branch information
saem authored and fabpot committed Mar 7, 2012
1 parent f6353b8 commit 77e8742
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Expand Up @@ -57,6 +57,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface
protected $name;
protected $startTime;
protected $classes;
protected $errorReportingLevel;

This comment has been minimized.

Copy link
@mpdude

mpdude Sep 5, 2013

Contributor

That line suddenly re-appeared in https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/HttpKernel/Kernel.php#L62 with the 2.3.4 release and I don't see where it is used. - @fabpot ?

This comment has been minimized.

Copy link
@fabpot

fabpot Sep 5, 2013

Member

fixed now (see 17f4a3d)


const VERSION = '2.1.0-DEV';

Expand Down Expand Up @@ -91,7 +92,7 @@ public function init()
error_reporting(-1);

DebugUniversalClassLoader::enable();
ErrorHandler::register();
ErrorHandler::register($this->errorReportingLevel);
if ('cli' !== php_sapi_name()) {
ExceptionHandler::register();
}
Expand Down

0 comments on commit 77e8742

Please sign in to comment.