You are here

public function RequestSanitizerTest::errorHandler in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::errorHandler()
  2. 10 core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::errorHandler()

Catches and logs errors to $this->errors.

Parameters

int $errno: The severity level of the error.

string $errstr: The error message.

File

core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php, line 349

Class

RequestSanitizerTest
Tests RequestSanitizer class.

Namespace

Drupal\Tests\Core\Security

Code

public function errorHandler($errno, $errstr) {
  $this->errors[] = compact('errno', 'errstr');
}