summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-01-06 10:37:03 +0300
committerAndrew Dolgov <[email protected]>2022-01-06 10:37:03 +0300
commitc3482fbe6b22885f5619df02387de09be0886cfe (patch)
tree4bbd69f4335855a3015805ab840e26f0301f4570 /classes/feeds.php
parent97baf3e8b9be699d972b91a159ccbe0891efe8ae (diff)
generate a warning if plugin-generated content of HOOK_ARTICLE_BUTTON or _LEFT_BUTTON can't be parsed as valid XML
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 65027cb9e..2c37d659a 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -254,6 +254,10 @@ class Feeds extends Handler_Protected {
$line["buttons_left"] .= $button_doc->saveXML($button_doc->firstChild);
}
+ } else if ($result) {
+ user_error(get_class($plugin) .
+ " plugin: content provided in HOOK_ARTICLE_LEFT_BUTTON is not valid XML: " .
+ Errors::libxml_last_error() . " $result", E_USER_WARNING);
}
},
$line);
@@ -273,6 +277,10 @@ class Feeds extends Handler_Protected {
$line["buttons"] .= $button_doc->saveXML($button_doc->firstChild);
}
+ } else if ($result) {
+ user_error(get_class($plugin) .
+ " plugin: content provided in HOOK_ARTICLE_BUTTON is not valid XML: " .
+ Errors::libxml_last_error() . " $result", E_USER_WARNING);
}
},
$line);