af_redditimgur: make sure content_link is defined even if content dupcheck is disabled
This commit is contained in:
parent
2e68712261
commit
582ff3cf6e
|
@ -301,8 +301,9 @@ class Af_RedditImgur extends Plugin {
|
||||||
@$doc->loadHTML($article["content"]);
|
@$doc->loadHTML($article["content"]);
|
||||||
$xpath = new DOMXPath($doc);
|
$xpath = new DOMXPath($doc);
|
||||||
|
|
||||||
|
$content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0);
|
||||||
|
|
||||||
if ($this->host->get($this, "enable_content_dupcheck")) {
|
if ($this->host->get($this, "enable_content_dupcheck")) {
|
||||||
$content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0);
|
|
||||||
|
|
||||||
if ($content_link) {
|
if ($content_link) {
|
||||||
$content_href = db_escape_string($content_link->getAttribute("href"));
|
$content_href = db_escape_string($content_link->getAttribute("href"));
|
||||||
|
|
Loading…
Reference in New Issue