From: Andrew Dolgov Date: Tue, 5 Jul 2016 08:01:36 +0000 (+0300) Subject: af_redditimgur: make sure content_link is defined even if content dupcheck is disabled X-Git-Tag: 16.8~22 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=582ff3cf6e617ccb6d6164da7381db80a0183127;p=tt-rss.git af_redditimgur: make sure content_link is defined even if content dupcheck is disabled --- diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 2e074813..8243b94c 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -301,8 +301,9 @@ class Af_RedditImgur extends Plugin { @$doc->loadHTML($article["content"]); $xpath = new DOMXPath($doc); + $content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0); + if ($this->host->get($this, "enable_content_dupcheck")) { - $content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0); if ($content_link) { $content_href = db_escape_string($content_link->getAttribute("href"));