Skip to content

Commit

Permalink
Merge pull request #103 from nijel/php-7.2
Browse files Browse the repository at this point in the history
PHP 7.2 fixes
  • Loading branch information
nijel authored Nov 30, 2016
2 parents 48acd1a + ed8a27d commit fa440b9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Components/Expression.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
continue;
}
$isExpr = true;
} elseif ($brackets === 0 && count($ret->expr) > 0 && ! $alias) {
} elseif ($brackets === 0 && strlen($ret->expr) > 0 && ! $alias) {
/* End of expression */
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Statements/DeleteStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function build()
if ($this->order != NULL && count($this->order) > 0) {
$ret .= ' ORDER BY ' . ExpressionArray::build($this->order);
}
if ($this->limit != NULL && count($this->limit) > 0) {
if ($this->limit != NULL && strlen($this->limit) > 0) {
$ret .= ' LIMIT ' . Limit::build($this->limit);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Statements/InsertStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function build()
$ret .= ' VALUES ' . Array2d::build($this->values);
} elseif ($this->set != NULL && count($this->set) > 0) {
$ret .= ' SET ' . SetOperation::build($this->set);
} elseif ($this->select != NULL && count($this->select) > 0) {
} elseif ($this->select != NULL && strlen($this->select) > 0) {
$ret .= ' ' . $this->select->build();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Statements/ReplaceStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function build()
$ret .= ' VALUES ' . Array2d::build($this->values);
} elseif ($this->set != NULL && count($this->set) > 0) {
$ret .= ' SET ' . SetOperation::build($this->set);
} elseif ($this->select != NULL && count($this->select) > 0) {
} elseif ($this->select != NULL && strlen($this->select) > 0) {
$ret .= ' ' . $this->select->build();
}

Expand Down

0 comments on commit fa440b9

Please sign in to comment.