From 6a7644e721fa3497c4e453807a7b5b51444e18eb Mon Sep 17 00:00:00 2001 From: Axsag <37663338+Axsag@users.noreply.github.com> Date: Fri, 7 Mar 2025 09:27:05 +0100 Subject: [PATCH] Error fixes DOMDocumentWrapper.php Removed undefined variable, fixed typo --- phpQuery/phpQuery/DOMDocumentWrapper.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpQuery/phpQuery/DOMDocumentWrapper.php b/phpQuery/phpQuery/DOMDocumentWrapper.php index 0b6a7fd..80cf77b 100644 --- a/phpQuery/phpQuery/DOMDocumentWrapper.php +++ b/phpQuery/phpQuery/DOMDocumentWrapper.php @@ -347,7 +347,6 @@ protected function charsetFromHTML($markup) { return $contentType[1]; } protected function charsetFromXML($markup) { - $matches; // find declaration preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i', $markup, $matches @@ -386,7 +385,7 @@ protected function charsetAppendToHTML($html, $charset, $xhtml = false) { .($xhtml ? '/' : '') .'>'; if (strpos($html, '