Skip to content

Commit a237944

Browse files
authored
Merge pull request #86 from LaswitchTech/dev
General: Version bumped to v0.0.86
2 parents 406b448 + fdd47d4 commit a237944

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Model/CoreModel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public function import(string $path, ?string $current = null): bool
262262
}
263263

264264
// Check if the record is empty
265-
if(empty($record)){
265+
if(empty($record) || count($record) == 0){
266266
continue;
267267
}
268268

@@ -288,9 +288,9 @@ public function import(string $path, ?string $current = null): bool
288288

289289
// Retrieve the last inserted id
290290
$lastId = 0;
291-
$lastRecord = $this->Database->query()->table($definition)->select()->order('id', 'DESC')->limit(1)->execute();
291+
$lastRecord = $this->Database->query()->table($definition)->select('id')->order('id', 'DESC')->limit(1)->execute();
292292
if(!empty($lastRecord)){
293-
$lastId = $lastRecord[0]['id'];
293+
$lastId = $lastRecord[array_key_first($lastRecord)]['id'];
294294
}
295295

296296
// Set default auto increment

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.85
1+
v0.0.86

0 commit comments

Comments
 (0)