You are here

public static function ErrorHandler::unstackErrors in Zircon Profile 8.0

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

Unstacks stacked errors and forwards to the logger.

3 calls to ErrorHandler::unstackErrors()
DebugClassLoader::loadClass in vendor/symfony/debug/DebugClassLoader.php
Loads the given class or interface.
ErrorHandler::handleFatalError in vendor/symfony/debug/ErrorHandler.php
Shutdown registered function for handling PHP fatal errors.
ErrorHandlerTest::testErrorStacking in vendor/symfony/debug/Tests/ErrorHandlerTest.php

File

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

Class

ErrorHandler
A generic ErrorHandler for the PHP engine.

Namespace

Symfony\Component\Debug

Code

public static function unstackErrors() {
  $level = array_pop(self::$stackedErrorLevels);
  if (null !== $level) {
    $e = error_reporting($level);
    if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) {

      // If the user changed the error level, do not overwrite it
      error_reporting($e);
    }
  }
  if (empty(self::$stackedErrorLevels)) {
    $errors = self::$stackedErrors;
    self::$stackedErrors = array();
    foreach ($errors as $e) {
      $e[0]
        ->log($e[1], $e[2], $e[3]);
    }
  }
}