Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ErrorHandler.php

function ErrorHandler::enable

File

vendor/phpunit/phpunit/src/Runner/ErrorHandler.php, line 174

Class

ErrorHandler
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Runner

Code

public function enable() : void {
    if ($this->enabled) {
        return;
    }
    $oldErrorHandler = set_error_handler($this);
    if ($oldErrorHandler !== null) {
        restore_error_handler();
        return;
    }
    $this->enabled = true;
    $this->originalErrorReportingLevel = error_reporting();
    error_reporting($this->originalErrorReportingLevel & self::UNHANDLEABLE_LEVELS);
}
RSS feed
Powered by Drupal