Fix searching for a space gives database error

(To actually search for a space, use quotes)
This commit is contained in:
Nathan Gray 2014-03-11 18:26:40 +00:00
parent 3b49be6203
commit 612b5bf34f

View File

@ -1194,6 +1194,7 @@ class so_sql
*/
public function search2criteria($pattern,&$wildcard='',&$op='AND',$extra_col=null, $search_cols = array())
{
$pattern = trim($pattern);
// This function can get called multiple times. Make sure it doesn't re-process.
if (empty($pattern) || is_array($pattern)) return $pattern;
if(strpos($pattern, 'CAST(COALESCE(') !== false)
@ -1201,7 +1202,6 @@ class so_sql
return $pattern;
}
$pattern = trim($pattern);
$criteria = array();
$filter = array();
$columns = array();