Skip to content

Commit 91baddc

Browse files
authored
Merge pull request #85 from YuzuruS/patch-1
support to the case where there is no 0th array
2 parents 294bdf1 + 2c814b5 commit 91baddc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Batch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function insert(Model $table, array $columns, array $values, int $batchSi
271271
{
272272
// no need for the old validation since we now use type hint that supports from php 7.0
273273
// but I kept this one
274-
if (count($columns) !== count($values[0])) {
274+
if (count($columns) !== count(current($values)) {
275275
return false;
276276
}
277277

0 commit comments

Comments
 (0)