Fixes 500 in bulk checkout if no asset is selected

This commit is contained in:
snipe
2017-10-18 07:15:16 -07:00
parent bd376a4992
commit 68f6385eba
2 changed files with 5 additions and 1 deletions
@@ -1179,6 +1179,9 @@ class AssetsController extends Controller
$user = User::find(e(Input::get('assigned_to')));
$admin = Auth::user();
if (!is_array(Input::get('selected_assets'))) {
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
}
$asset_ids = array_filter(Input::get('selected_assets'));
if ((Input::has('checkout_at')) && (Input::get('checkout_at')!= date("Y-m-d"))) {