diff options
author | Andrew Dolgov <[email protected]> | 2021-10-26 15:45:12 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-10-26 15:45:12 +0300 |
commit | 76d8b1bf6f8858989bd99937fb029cab929aa472 (patch) | |
tree | e8946989702d1c05acb18e7daa7354d44d5c44af | |
parent | 933913410c10c580f698d76771eb067c4dce10f1 (diff) |
HOOK_ARTICLE_BUTTON/HOOK_ARTICLE_LEFT_BUTTON: only try to parse markup if its actually there
-rwxr-xr-x | classes/feeds.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index 819fdacb0..ea9158949 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -235,7 +235,7 @@ class Feeds extends Handler_Protected { $line["buttons_left"] = ""; PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_ARTICLE_LEFT_BUTTON, function ($result, $plugin) use (&$line, &$button_doc) { - if ($button_doc->loadXML($result)) { + if ($result && $button_doc->loadXML($result)) { /** @var DOMElement|null */ $child = $button_doc->firstChild; @@ -254,7 +254,7 @@ class Feeds extends Handler_Protected { $line["buttons"] = ""; PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_ARTICLE_BUTTON, function ($result, $plugin) use (&$line, &$button_doc) { - if ($button_doc->loadXML($result)) { + if ($result && $button_doc->loadXML($result)) { /** @var DOMElement|null */ $child = $button_doc->firstChild; |