summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-02-20 09:34:00 +0400
committerAndrew Dolgov <[email protected]>2013-02-20 09:34:00 +0400
commit7726063cf25e120ac07caee76240695f6588adf8 (patch)
tree0bafa94c05c0fd0aa3a3ed84717a1627bb66e7c9 /include
parentacfbab375d18e93ddc82c3e8fe1e5784593f5b40 (diff)
fix php warning while testing filters with regexps too complex for the database
Diffstat (limited to 'include')
-rw-r--r--include/functions.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index 7409ec76a..37cfd4844 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -2153,12 +2153,16 @@
ttrss_user_entries, ttrss_feeds, ttrss_feed_categories
WHERE $filter_query_part LIMIT 1", false);
- $test = db_fetch_result($result, 0, "true_val");
+ if ($result) {
+ $test = db_fetch_result($result, 0, "true_val");
- if (!$test) {
- $filter_query_part = "false AND";
+ if (!$test) {
+ $filter_query_part = "false AND";
+ } else {
+ $filter_query_part .= " AND";
+ }
} else {
- $filter_query_part .= " AND";
+ $filter_query_part = "false AND";
}
} else {