mirror of
https://github.com/j0k3r/php-readability.git
synced 2026-09-26 22:16:12 +00:00
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 in175196d6c2but I did not manage to reproduce the original error (Entity 'nbsp' not defined). It was probably fixed byf2a43b476c.
This commit is contained in:
@@ -338,7 +338,7 @@ class ReadabilityTest extends \PHPUnit\Framework\TestCase
|
|||||||
$oldErrorReporting = error_reporting(\E_ALL);
|
$oldErrorReporting = error_reporting(\E_ALL);
|
||||||
$oldDisplayErrors = ini_set('display_errors', '1');
|
$oldDisplayErrors = ini_set('display_errors', '1');
|
||||||
// dummy function to be used to the next test
|
// 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);
|
throw new \Exception($errstr, $errno);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user