Account for admin role, don't error out on null rows #632 (#637)

This commit is contained in:
Nabeel S
2020-03-23 11:50:15 -04:00
committed by GitHub
parent 9e5386264f
commit 877d5a5479
3 changed files with 22 additions and 4 deletions

View File

@@ -195,7 +195,7 @@ class ImporterDB
$rows = [];
$result = $this->readRowsOffset($table, $this->batchSize, $offset, $order_by, $fields);
if ($result === false) {
if ($result === false || $result === null) {
return [];
}
@@ -203,7 +203,7 @@ class ImporterDB
foreach ($result as $row) {
$rows[] = $row;
}
} catch (Exception $e) {
} catch (\Exception $e) {
Log::error('foreach rows error: '.$e->getMessage());
}