From: Brion Vibber Date: Fri, 28 Jan 2005 00:35:23 +0000 (+0000) Subject: * (bug 1368) Fix SQL error on stopword/short word search w/ MySQL 3.x X-Git-Tag: 1.5.0alpha1~830 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=5fdd66625d5f6dca2a05560d5363ac772bfbfeec;p=lhc%2Fweb%2Fwiklou.git * (bug 1368) Fix SQL error on stopword/short word search w/ MySQL 3.x --- 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 . ' )';