diff options
Diffstat (limited to 'core/Segment')
-rw-r--r-- | core/Segment/SegmentExpression.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Segment/SegmentExpression.php b/core/Segment/SegmentExpression.php index 4078321ce0..10cf0294e3 100644 --- a/core/Segment/SegmentExpression.php +++ b/core/Segment/SegmentExpression.php @@ -48,7 +48,7 @@ class SegmentExpression public function isEmpty() { - return empty($this->string); + return count($this->tree) == 0; } protected $joins = array(); @@ -342,7 +342,7 @@ class SegmentExpression */ public function getSql() { - if (count($this->tree) == 0) { + if ($this->isEmpty()) { throw new Exception("Invalid segment, please specify a valid segment."); } $sql = ''; |