BUGFIX: empty limit arrays filtered out

This commit is contained in:
Geoff Munn 2009-10-02 02:35:32 +00:00
parent f6a5fa8925
commit 74954dc374

View File

@ -1074,12 +1074,13 @@ class PostgreSQLDatabase extends Database {
if($sqlQuery->limit) {
$limit = $sqlQuery->limit;
// Pass limit as array or SQL string value
if(is_array($limit)) {
if(isset($limit['start']))
if(isset($limit['start']) && $limit['start']!='')
$text.=' OFFSET ' . $limit['start'];
if(isset($limit['limit']))
if(isset($limit['limit']) && $limit['limit']!='')
$text.=' LIMIT ' . $limit['limit'];
} else {