From 726d2eab54bde9072992100c39638b27012b8126 Mon Sep 17 00:00:00 2001 From: ihackcode Date: Sat, 11 Feb 2023 17:26:17 -0500 Subject: [PATCH] Fix issue with strings being sent to chr() --- class/Metagen.php | 2 +- class/Utility.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/class/Metagen.php b/class/Metagen.php index 066395d8..08bb3c7c 100644 --- a/class/Metagen.php +++ b/class/Metagen.php @@ -436,7 +436,7 @@ public function html2text($document) \preg_replace_callback( '/&#(\d+);/', static function ($matches) { - return \chr($matches[1]); + return \chr(intval($matches[1])); }, $document ); diff --git a/class/Utility.php b/class/Utility.php index f65d7ead..930d460b 100644 --- a/class/Utility.php +++ b/class/Utility.php @@ -522,7 +522,7 @@ public static function html2text($document) \preg_replace_callback( '/&#(\d+);/', static function ($matches) { - return \chr($matches[1]); + return \chr(intval($matches[1])); }, $document );