FIXED : #282 : problem converting docx to pdf

PHP Catchable fatal error: Argument 2 passed to DOMXPath::query() must be an instance of DOMNode, null given, called in /var/www/xxx/PhpWord/Reader/Word2007.php on line 145 and defined in /var/www/xxx/PhpWord/Shared/XMLReader.php on line 99, referer: XXX
This commit is contained in:
Progi1984 2014-06-17 15:48:39 +02:00
parent 5c8e100d41
commit 71b4ac9c56
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ class XMLReader
$this->xpath = new \DOMXpath($this->dom);
}
return $this->xpath->query($path, $contextNode);
if (is_null($contextNode)) {
return $this->xpath->query($path);
} else {
return $this->xpath->query($path, $contextNode);
}
}
/**