summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-01-28 09:34:56 +0300
committerAndrew Dolgov <[email protected]>2022-01-28 09:34:56 +0300
commita4063069c88d5b45042e288212ebf3cf6f03ecaa (patch)
tree02a2f5f2fa49b23ef5513dfe6ded4cc731162637
parent893e783b1562d074e6c868bf360b1345d6f313f8 (diff)
fix preg_match() used incorrectly making plugin work on every feed
-rwxr-xr-xinit.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.php b/init.php
index e5aa0da..27ff608 100755
--- a/init.php
+++ b/init.php
@@ -178,7 +178,7 @@ class Reddit_Delay extends Plugin {
$delay = (int) $this->host->get($this, "delay");
$enabled_feeds = $this->host->get_array($this, "enabled_feeds");
- if (in_array($feed_id, $enabled_feeds) || preg_match("/\.?reddit\.com/", $fetch_url) !== false && $delay > 0) {
+ if (in_array($feed_id, $enabled_feeds) || preg_match("/\.?reddit\.com/", $fetch_url) === 1 && $delay > 0) {
$doc = new DOMDocument();