You are here

private function ErrorHandler::reRegister in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/debug/ErrorHandler.php \Symfony\Component\Debug\ErrorHandler::reRegister()

Re-registers as a PHP error handler if levels changed.

2 calls to ErrorHandler::reRegister()
ErrorHandler::setLoggers in vendor/symfony/debug/ErrorHandler.php
Sets a logger for each error level.
ErrorHandler::throwAt in vendor/symfony/debug/ErrorHandler.php
Sets the PHP error levels that throw an exception when a PHP error occurs.

File

vendor/symfony/debug/ErrorHandler.php, line 326

Class

ErrorHandler
A generic ErrorHandler for the PHP engine.

Namespace

Symfony\Component\Debug

Code

private function reRegister($prev) {
  if ($prev !== $this->thrownErrors | $this->loggedErrors) {
    $handler = set_error_handler('var_dump', 0);
    $handler = is_array($handler) ? $handler[0] : null;
    restore_error_handler();
    if ($handler === $this) {
      restore_error_handler();
      set_error_handler(array(
        $this,
        'handleError',
      ), $this->thrownErrors | $this->loggedErrors);
    }
  }
}