mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:05:55 +00:00
generate a warning if plugin-generated content of HOOK_ARTICLE_BUTTON or _LEFT_BUTTON can't be parsed as valid XML
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user