diff --git a/Crawler.php b/Crawler.php index 619940c..15773f4 100644 --- a/Crawler.php +++ b/Crawler.php @@ -1084,7 +1084,7 @@ private function parseXhtml(string $htmlContent, string $charset = 'UTF-8'): \DO */ private function convertToHtmlEntities(string $htmlContent, string $charset = 'UTF-8'): string { - set_error_handler(function () { throw new \Exception(); }); + set_error_handler(static fn () => throw new \Exception()); try { return mb_encode_numericentity($htmlContent, [0x80, 0x10FFFF, 0, 0x1FFFFF], $charset);