A free open source IT asset/license management system
Error handling for when log ID has no match on asset accept
sniped03b8c6528fd
diff --git a/app/Http/Controllers/ViewAssetsController.php b/app/Http/Controllers/ViewAssetsController.phpindex 6c112ff657..2aa5286757 100755--- a/app/Http/Controllers/ViewAssetsController.php+++ b/app/Http/Controllers/ViewAssetsController.php@@ -284,9 +284,10 @@ class ViewAssetsController extends Controllerpublic function getAcceptAsset($logID = null){- if (!$findlog = Actionlog::where('id', $logID)->first()) {- echo 'no record';- //return redirect()->to('account')->with('error', trans('admin/hardware/message.does_not_exist'));+ $findlog = Actionlog::where('id', $logID)->first();++ if (!$findlog) {+ return redirect()->to('account/view-assets')->with('error', 'No matching record.');}if ($findlog->accepted_id!='') {