HOOK_ARTICLE_BUTTON/HOOK_ARTICLE_LEFT_BUTTON: only try to parse markup if its actually there
This commit is contained in:
parent
933913410c
commit
76d8b1bf6f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue