Skip to content
This repository was archived by the owner on Apr 26, 2020. It is now read-only.

Commit 196aa28

Browse files
committed
Merge pull request #10 from ywfwj2008/fixed-bugs
Fixed bugs
2 parents 1eb8a9c + ec73fc8 commit 196aa28

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

phpQuery/phpQuery/DOMDocumentWrapper.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,6 @@ protected function isXML($markup) {
314314
}
315315

316316
protected function contentTypeToArray($contentType) {
317-
$test = null;
318-
$test =
319317
$matches = explode(';', trim(strtolower($contentType)));
320318
if (isset($matches[1])) {
321319
$matches[1] = explode('=', $matches[1]);
@@ -351,7 +349,7 @@ protected function charsetFromHTML($markup) {
351349
return $contentType[1];
352350
}
353351
protected function charsetFromXML($markup) {
354-
$matches;
352+
$matches = array();
355353
// find declaration
356354
preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i',
357355
$markup, $matches

0 commit comments

Comments
 (0)