From 5fdd66625d5f6dca2a05560d5363ac772bfbfeec Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 28 Jan 2005 00:35:23 +0000 Subject: [PATCH] * (bug 1368) Fix SQL error on stopword/short word search w/ MySQL 3.x --- includes/SearchMySQL3.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/SearchMySQL3.php b/includes/SearchMySQL3.php index d6b1b7eb07..bd2a0ede53 100644 --- a/includes/SearchMySQL3.php +++ b/includes/SearchMySQL3.php @@ -72,7 +72,9 @@ class SearchMySQL3 extends SearchEngine { } } if ( 0 == count( $this->searchTerms ) ) { - return null; + # No searchable terms remaining. + # We have to return a term for the query or we get an SQL error. + return "0"; } return '(' . $cond . ' )'; -- 2.20.1