Merge branch 'develop' of https://github.com/snipe/snipe-it into develop

This commit is contained in:
snipe 2023-03-14 14:34:11 -07:00
commit f0d05a7461

View file

@ -627,7 +627,11 @@ class AssetsController extends Controller
$csv->setHeaderOffset(0);
$header = $csv->getHeader();
$isCheckinHeaderExplicit = in_array('checkin date', (array_map('strtolower', $header)));
$results = $csv->getRecords();
try {
$results = $csv->getRecords();
} catch (\Exception $e) {
return back()->with('error', 'There was an error reading the CSV file: '.$e->getMessage());
}
$item = [];
$status = [];
$status['error'] = [];