summaryrefslogtreecommitdiff
path: root/classes/rssutils.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-06 23:05:02 +0300
committerAndrew Dolgov <[email protected]>2018-12-06 23:05:02 +0300
commit5780a5d5013ffd4f93d1e6acee2ca3037c6f1210 (patch)
tree7d65ac7a850a6736c87bc4a4e92a250a0930c143 /classes/rssutils.php
parent4cbc62d2a529116d0117eb83a62c3270b5e6bd9f (diff)
do not try to update filter triggers if nothing was triggered
Diffstat (limited to 'classes/rssutils.php')
-rwxr-xr-xclasses/rssutils.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php
index b43e752da..cc011d61a 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -783,9 +783,12 @@ class RSSUtils {
$matched_filter_ids = implode(",", array_map(function($f) { return $f['id']; }, $matched_filters));
- $fsth = $pdo->prepare("UPDATE ttrss_filters2 SET last_triggered = NOW() WHERE
+
+ if ($matched_filter_ids) {
+ $fsth = $pdo->prepare("UPDATE ttrss_filters2 SET last_triggered = NOW() WHERE
id IN (?) AND owner_uid = ?");
- $fsth->execute([$matched_filter_ids, $owner_uid]);
+ $fsth->execute([$matched_filter_ids, $owner_uid]);
+ }
if (Debug::get_loglevel() >= Debug::$LOG_EXTENDED) {
Debug::log("matched filters: ", Debug::$LOG_VERBOSE);