Skip to content

Commit fa440b9

Browse files
authored
Merge pull request #103 from nijel/php-7.2
PHP 7.2 fixes
2 parents 48acd1a + ed8a27d commit fa440b9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Components/Expression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
261261
continue;
262262
}
263263
$isExpr = true;
264-
} elseif ($brackets === 0 && count($ret->expr) > 0 && ! $alias) {
264+
} elseif ($brackets === 0 && strlen($ret->expr) > 0 && ! $alias) {
265265
/* End of expression */
266266
break;
267267
}

src/Statements/DeleteStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function build()
154154
if ($this->order != NULL && count($this->order) > 0) {
155155
$ret .= ' ORDER BY ' . ExpressionArray::build($this->order);
156156
}
157-
if ($this->limit != NULL && count($this->limit) > 0) {
157+
if ($this->limit != NULL && strlen($this->limit) > 0) {
158158
$ret .= ' LIMIT ' . Limit::build($this->limit);
159159
}
160160

src/Statements/InsertStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function build()
121121
$ret .= ' VALUES ' . Array2d::build($this->values);
122122
} elseif ($this->set != NULL && count($this->set) > 0) {
123123
$ret .= ' SET ' . SetOperation::build($this->set);
124-
} elseif ($this->select != NULL && count($this->select) > 0) {
124+
} elseif ($this->select != NULL && strlen($this->select) > 0) {
125125
$ret .= ' ' . $this->select->build();
126126
}
127127

src/Statements/ReplaceStatement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function build()
9999
$ret .= ' VALUES ' . Array2d::build($this->values);
100100
} elseif ($this->set != NULL && count($this->set) > 0) {
101101
$ret .= ' SET ' . SetOperation::build($this->set);
102-
} elseif ($this->select != NULL && count($this->select) > 0) {
102+
} elseif ($this->select != NULL && strlen($this->select) > 0) {
103103
$ret .= ' ' . $this->select->build();
104104
}
105105

0 commit comments

Comments
 (0)