Пример #1
0
 /**
  * Handle fatal errors and such
  *
  * @codeCoverageIgnore
  */
 public function handleShutdown()
 {
     $error = error_get_last();
     if ($error && Severity::fromPhpErrorNo($error['type']) >= $this->errorHandler->getMinSeverityOnShutdown()) {
         $error = new ErrorException($error['message'], $error['type'], $error['file'], $error['line']);
         $this->handleError($error);
     }
 }
Пример #2
0
 /**
  * Handle fatal errors and such
  *
  * @codeCoverageIgnore
  */
 public function handleShutdown()
 {
     if (!$this->shutdownHandlerRegistered) {
         return;
     }
     $error = error_get_last();
     if ($error && Severity::fromPhpErrorNo($error['type']) >= $this->minSeverityOnShutdown) {
         $this->handleError($error['type'], $error['message'], $error['file'], $error['line']);
     }
 }
Пример #3
0
 /**
  * @dataProvider provideSeverityTranslations
  */
 public function testSeverityTranslation($errorNo, $severity)
 {
     $this->assertEquals($severity, Severity::fromPhpErrorNo($errorNo));
 }