Fixed #7100 - Check if $user isset on checkin

This commit is contained in:
snipe 2019-05-30 19:06:30 -07:00
parent 2c64739e8f
commit 74a2c29bc2

View file

@ -93,7 +93,7 @@ class AssetCheckinController extends Controller
$data['model_name'] = $asset->model->name;
$data['model_number'] = $asset->model->model_number;
if (($user) && ($backto =='user')) {
if ((isset($user)) && ($backto =='user')) {
return redirect()->route("users.show", $user->id)->with('success', trans('admin/hardware/message.checkin.success'));
}
return redirect()->route("hardware.index")->with('success', trans('admin/hardware/message.checkin.success'));