Remove extra set_error_handler callback argument

It is unused and would cause an error on PHP ≥ 8.0:
https://www.php.net/manual/en/function.set-error-handler.php#refsect1-function.set-error-handler-parameters

Not sure if the handler is even necessary – it was introduced in 175196d6c2 but I did not manage to reproduce the original error (Entity 'nbsp' not defined). It was probably fixed by f2a43b476c.
pull/92/head
Jan Tojnar 1 year ago
parent 5b9551d1e3
commit da755013aa
  1. 2
      tests/ReadabilityTest.php

@ -338,7 +338,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase
$oldErrorReporting = error_reporting(\E_ALL);
$oldDisplayErrors = ini_set('display_errors', '1');
// dummy function to be used to the next test
set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline, array $errcontext) {
set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline) {
throw new \Exception($errstr, $errno);
});

Loading…
Cancel
Save