Avoid HTML parsing of an empty body
This commit is contained in:
@@ -1475,6 +1475,10 @@ class GServer
|
||||
*/
|
||||
private static function analyseRootBody($curlResult, array $serverdata, string $url)
|
||||
{
|
||||
if (empty($curlResult->getBody())) {
|
||||
return $serverdata;
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
@$doc->loadHTML($curlResult->getBody());
|
||||
$xpath = new DOMXPath($doc);
|
||||
|
||||
Reference in New Issue
Block a user