]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_redditimgur: make sure content_link is defined even if content dupcheck is disabled
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 5 Jul 2016 08:01:36 +0000 (11:01 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 5 Jul 2016 08:01:36 +0000 (11:01 +0300)
plugins/af_redditimgur/init.php

index 2e07481373826e4eb98829b6dd710439f3cc6bad..8243b94c43db1b70bdd9b78727b9a33ddc248268 100755 (executable)
@@ -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"));