Skip to content

Commit becade5

Browse files
committed
Use strlen() on string like objects instead of count()
Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 2cc5bc5 commit becade5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Statements/LoadStatement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function build()
185185

186186
$ret .= ' INTO TABLE ' . $this->table;
187187

188-
if ($this->partition !== null && count($this->partition) > 0) {
188+
if ($this->partition !== null && strlen($this->partition) > 0) {
189189
$ret .= ' PARTITION ' . ArrayObj::build($this->partition);
190190
}
191191

@@ -197,7 +197,7 @@ public function build()
197197
$ret .= ' ' . $this->fields_keyword . ' ' . $this->fields_options;
198198
}
199199

200-
if ($this->lines_options !== null && count($this->lines_options) > 0) {
200+
if ($this->lines_options !== null && strlen($this->lines_options) > 0) {
201201
$ret .= ' LINES ' . $this->lines_options;
202202
}
203203

0 commit comments

Comments
 (0)