Skip to content

Commit 5d8eeca

Browse files
authored
Merge pull request #16 from jr-cologne/jr_fix-#15
Fix bug #15
2 parents d107e1c + 29cb6ca commit 5d8eeca

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
}
2020
},
2121
"homepage": "https://github.com/jr-cologne/db-class",
22-
"time": "2017-11-11",
2322
"license": "MIT",
2423
"authors": [
2524
{

src/QueryBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected function formatWhere(array $where) {
183183
foreach ($where as $column => $value) {
184184
$where_clause .= "`{$column}` = :where_{$column}";
185185

186-
if (!empty(next($where))) {
186+
if (next($where) !== false) {
187187
$where_clause .= ' && ';
188188
}
189189
}
@@ -223,7 +223,7 @@ protected function formatData(array $data) {
223223
foreach ($data as $column => $value) {
224224
$data_string .= "`{$column}` = :{$column}";
225225

226-
if (!empty(next($data))) {
226+
if (next($data) !== false) {
227227
$data_string .= ', ';
228228
}
229229
}

0 commit comments

Comments
 (0)