From: Andrew Dolgov Date: Wed, 20 Feb 2013 05:34:00 +0000 (+0400) Subject: fix php warning while testing filters with regexps too complex for the database X-Git-Tag: 1.7.1~68 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7726063cf25e120ac07caee76240695f6588adf8;p=tt-rss.git fix php warning while testing filters with regexps too complex for the database --- diff --git a/include/functions.php b/include/functions.php index 7409ec76..37cfd484 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 {