summaryrefslogtreecommitdiff
path: root/init.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-06 00:19:42 +0300
committerAndrew Dolgov <[email protected]>2021-02-06 00:19:42 +0300
commitb5e68556d516a5502dd91354317d4a5e410e297f (patch)
tree4120283dd54b38bafc0b16187c0364d76e4c248d /init.php
parentd102daa0543077b3f46abf74b9432f713ecc3e37 (diff)
don't try to load empty HTML
Diffstat (limited to 'init.php')
-rwxr-xr-xinit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.php b/init.php
index b68cc2e..cf5ec88 100755
--- a/init.php
+++ b/init.php
@@ -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]");