From da755013aadc3745ba5a13e9e77f6463ba959949 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 10 Oct 2024 08:42:00 +0200 Subject: [PATCH] Remove extra set_error_handler callback argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 175196d6c2e2a2cc920c5e1720639b770a2edd10 but I did not manage to reproduce the original error (Entity 'nbsp' not defined). It was probably fixed by f2a43b476c039105cd0a4370b35b0244826913fa. --- tests/ReadabilityTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ReadabilityTest.php b/tests/ReadabilityTest.php index 1215f17..8a29629 100644 --- a/tests/ReadabilityTest.php +++ b/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); });