From bbd96a956f681d744c25cf682480bb2ce86b5bf9 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 26 Jul 2023 17:12:55 +0200 Subject: [PATCH] More short closures + isset instead of null checks + etc. --- Crawler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Crawler.php b/Crawler.php index 274aeee..27d8166 100644 --- a/Crawler.php +++ b/Crawler.php @@ -1110,7 +1110,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);