Quit earlier in ProbeURL->getFeedLink if body is empty

This commit is contained in:
Hypolite Petovan 2021-02-23 16:06:34 -05:00 committed by GitHub
parent 995d53ebfc
commit 77b24a0b66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1754,10 +1754,11 @@ class Probe
*/
public static function getFeedLink(string $url, string $body)
{
$doc = new DOMDocument();
if (empty($body)) {
return '';
}
$doc = new DOMDocument();
if (!@$doc->loadHTML($body)) {
return false;
}