diff options
author | Andrew Dolgov <[email protected]> | 2021-02-06 00:19:42 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-06 00:19:42 +0300 |
commit | b5e68556d516a5502dd91354317d4a5e410e297f (patch) | |
tree | 4120283dd54b38bafc0b16187c0364d76e4c248d /init.php | |
parent | d102daa0543077b3f46abf74b9432f713ecc3e37 (diff) |
don't try to load empty HTML
Diffstat (limited to 'init.php')
-rwxr-xr-x | init.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -257,7 +257,7 @@ class Af_Img_Phash extends Plugin { $doc = new DOMDocument(); - if (@$doc->loadHTML($article["content"])) { + if (!empty($article["content"]) && @$doc->loadHTML($article["content"])) { $xpath = new DOMXPath($doc); $imgs = $xpath->query("//img[@src]|//video[@poster]"); @@ -422,7 +422,7 @@ class Af_Img_Phash extends Plugin { $article_guid = $article["guid"]; - if (@$doc->loadHTML($article["content"])) { + if (!empty($article["content"]) && @$doc->loadHTML($article["content"])) { $xpath = new DOMXPath($doc); $imgs = $xpath->query("//img[@src]|//video[@poster]"); |