diff options
Diffstat (limited to 'core/Segment.php')
-rw-r--r-- | core/Segment.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Segment.php b/core/Segment.php index d9f8d163c6..0ba687740e 100644 --- a/core/Segment.php +++ b/core/Segment.php @@ -299,12 +299,13 @@ class Segment { $segmentExpression = $this->segmentExpression; - if ($offset > 0) { - $limit = (int) $offset . ', ' . (int) $limit; + $limitAndOffset = null; + if($limit > 0) { + $limitAndOffset = (int) $offset . ', ' . (int) $limit; } return $this->segmentQueryBuilder->getSelectQueryString($segmentExpression, $select, $from, $where, $bind, - $groupBy, $orderBy, $limit); + $groupBy, $orderBy, $limitAndOffset); } /** |