"fixed so_sql::get_rows to return an empty array() instead of array(false) if nothing found"

This commit is contained in:
Ralf Becker 2007-11-27 21:24:50 +00:00
parent bb20c359f2
commit fb9d6db5be

View File

@ -837,10 +837,12 @@ class so_sql
$criteria[$col] = $query['search'];
}
}
$rows = (array) $this->search($criteria,false,$query['order']?$query['order'].' '.$query['sort']:'',
$rows = $this->search($criteria,false,$query['order']?$query['order'].' '.$query['sort']:'',
'','%',false,'OR',$query['num_rows']?array((int)$query['start'],$query['num_rows']):(int)$query['start'],
$query['col_filter'],$join,$need_full_no_count);
if (!$rows) $rows = array(); // otherwise false returned from search would be returned as array(false)
return $this->total;
}