From 1dd41413286c62c19af4be5182dedcefb5e0054c Mon Sep 17 00:00:00 2001 From: castroCrea Date: Tue, 3 Jan 2023 11:32:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixes=20#10=20:=20Warning:=20Und?= =?UTF-8?q?efined=20array=20key=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Readability.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Readability.php b/src/Readability.php index 6407a92..a09e88a 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -1078,7 +1078,7 @@ private function unescapeHtmlEntities($str) { }, $str); $str = preg_replace_callback('/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/i', function ($matches) { $hex = $matches[1]; - $numStr = $matches[2]; + $numStr = $matches[2] ?? '0'; if ($hex !== '') { $num = intval($hex, 16); } else {