Skip to content

Commit 21e0cb6

Browse files
authored
Merge pull request #1 from Axsag/Axsag-patch-1
Error fixes DOMDocumentWrapper.php
2 parents be908b6 + 6a7644e commit 21e0cb6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

phpQuery/phpQuery/DOMDocumentWrapper.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ protected function charsetFromHTML($markup) {
347347
return $contentType[1];
348348
}
349349
protected function charsetFromXML($markup) {
350-
$matches;
351350
// find declaration
352351
preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i',
353352
$markup, $matches
@@ -386,7 +385,7 @@ protected function charsetAppendToHTML($html, $charset, $xhtml = false) {
386385
.($xhtml ? '/' : '')
387386
.'>';
388387
if (strpos($html, '<head') === false) {
389-
if (strpos($hltml, '<html') === false) {
388+
if (strpos($html, '<html') === false) {
390389
return $meta.$html;
391390
} else {
392391
return preg_replace(
@@ -674,4 +673,4 @@ public static function expandEmptyTag($tag, $xml){
674673
}
675674
return $xml;
676675
}
677-
}
676+
}

0 commit comments

Comments
 (0)