mirror of
https://github.com/friendica/friendica
synced 2025-04-28 02:30:16 +00:00
Avoid HTML parsing of an empty body
This commit is contained in:
parent
3e2fa7867c
commit
5a00902e11
7 changed files with 26 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue