From fcbc7e4540a955e37be26001a79b035332a88610 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 24 May 2019 14:51:27 -0700 Subject: [PATCH] Fixed Undefined variable user in $backto if checked out to a non-user Fixes [ch9194] --- app/Http/Controllers/AssetCheckinController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/AssetCheckinController.php b/app/Http/Controllers/AssetCheckinController.php index 9b790541ae..3f6a6b87a9 100644 --- a/app/Http/Controllers/AssetCheckinController.php +++ b/app/Http/Controllers/AssetCheckinController.php @@ -93,7 +93,7 @@ class AssetCheckinController extends Controller $data['model_name'] = $asset->model->name; $data['model_number'] = $asset->model->model_number; - if ($backto=='user') { + if (($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'));