From 1be503b21a4c7ccd945ab42247be118f3660a65d Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 18 Oct 2023 14:36:16 +0100 Subject: [PATCH] Make sure order number is not an array Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 2 +- resources/views/hardware/index.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index e49edc4db4..c838da15e5 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -295,7 +295,7 @@ class AssetsController extends Controller } if ($request->filled('order_number')) { - $assets->where('assets.order_number', '=', $request->get('order_number')); + $assets->where('assets.order_number', '=', strval($request->get('order_number'))); } // This is kinda gross, but we need to do this because the Bootstrap Tables diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php index a9a0dba580..d30a1c012a 100755 --- a/resources/views/hardware/index.blade.php +++ b/resources/views/hardware/index.blade.php @@ -34,7 +34,7 @@ {{ trans('general.assets') }} @if (Request::has('order_number')) - : Order #{{ Request::get('order_number') }} + : Order #{{ strval(Request::get('order_number')) }} @endif @stop @@ -88,7 +88,7 @@ class="table table-striped snipe-table" data-url="{{ route('api.assets.index', array('status' => e(Request::get('status')), - 'order_number'=>e(Request::get('order_number')), + 'order_number'=>e(strval(Request::get('order_number'))), 'company_id'=>e(Request::get('company_id')), 'status_id'=>e(Request::get('status_id')))) }}" data-export-options='{