af_redditimgur: make sure content_link is defined even if content dupcheck is disabled

master
Andrew Dolgov 9 years ago
parent 2e68712261
commit 582ff3cf6e

@ -301,9 +301,10 @@ class Af_RedditImgur extends Plugin {
@$doc->loadHTML($article["content"]);
$xpath = new DOMXPath($doc);
if ($this->host->get($this, "enable_content_dupcheck")) {
$content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0);
if ($this->host->get($this, "enable_content_dupcheck")) {
if ($content_link) {
$content_href = db_escape_string($content_link->getAttribute("href"));
$entry_guid = db_escape_string($article["guid_hashed"]);

Loading…
Cancel
Save