summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-10-01 13:20:07 +0300
committerAndrew Dolgov <[email protected]>2020-10-01 13:20:07 +0300
commit38a7a1da88904faf9fe5ca3c222e5f27920f3300 (patch)
treee19932e4847b2993a56c9f8b5b15ce9df72f4f1c /plugins
parent24cdacd59e748ac49b84066f320563eca34ffe39 (diff)
hide uninteresting errors in several DOMDocument->loadHTML() invocations
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/af_redditimgur/init.php4
-rwxr-xr-xplugins/cache_starred_images/init.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index 2c213c10b..d3e91f383 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -24,7 +24,7 @@ class Af_RedditImgur extends Plugin {
function hook_prefs_tab($args) {
if ($args != "prefFeeds") return;
- print "<div dojoType=\"dijit.layout.AccordionPane\"
+ print "<div dojoType=\"dijit.layout.AccordionPane\"
title=\"<i class='material-icons'>extension</i> ".__('Reddit content settings (af_redditimgur)')."\">";
$enable_readability = $this->host->get($this, "enable_readability");
@@ -111,7 +111,7 @@ class Af_RedditImgur extends Plugin {
if ($oembed_result && isset($oembed_result["html"])) {
$tmp = new DOMDocument();
- if ($tmp->loadHTML('<?xml encoding="utf-8" ?>' . $oembed_result["html"])) {
+ if (@$tmp->loadHTML('<?xml encoding="utf-8" ?>' . $oembed_result["html"])) {
$p = $doc->createElement("p");
$p->appendChild($doc->importNode(
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index 5fe963e32..0911825e7 100755
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -190,7 +190,7 @@ class Cache_Starred_Images extends Plugin {
$has_images = false;
$success = false;
- if ($doc->loadHTML('<?xml encoding="UTF-8">' . $content)) {
+ if (@$doc->loadHTML('<?xml encoding="UTF-8">' . $content)) {
$xpath = new DOMXPath($doc);
$entries = $xpath->query('(//img[@src])|(//video/source[@src])');