mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Merge pull request #12668 from inietov/fixes/undefined_array_key_0
Fixed ErrorException: Undefined array key 0 [sc-20424]
This commit is contained in:
commit
4c66267f3b
|
@ -1024,7 +1024,11 @@ class ReportsController extends Controller
|
||||||
if (is_null($acceptance->created_at)){
|
if (is_null($acceptance->created_at)){
|
||||||
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
|
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
|
||||||
} else {
|
} else {
|
||||||
$logItem = $assetItem->checkouts()->where('created_at', '=', $acceptance->created_at)->get()[0];
|
$logItem_res = $assetItem->checkouts()->where('created_at', '=', $acceptance->created_at)->get();
|
||||||
|
if ($logItem_res->isEmpty()){
|
||||||
|
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.bad_data'));
|
||||||
|
}
|
||||||
|
$logItem = $logItem_res[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$assetItem->assignedTo->locale){
|
if(!$assetItem->assignedTo->locale){
|
||||||
|
|
Loading…
Reference in a new issue