From f5d1cf65a1a5d95bfff6c656764b8da08f078ea9 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Thu, 27 May 2021 13:14:16 +0800 Subject: [PATCH] Fix serial variable error #571 --- src/Controller/CAPI/WarrantyController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Controller/CAPI/WarrantyController.php b/src/Controller/CAPI/WarrantyController.php index cfc49226..fc9e8cd7 100644 --- a/src/Controller/CAPI/WarrantyController.php +++ b/src/Controller/CAPI/WarrantyController.php @@ -150,6 +150,8 @@ class WarrantyController extends APIController { $this->denyAccessUnlessGranted('warranty.register.battery', null, 'No access.'); + $serial = $req->request->get('serial'); + // required parameters $params = [ 'serial', @@ -189,7 +191,6 @@ class WarrantyController extends APIController return new APIResponse(false, $msg); } - $serial = $req->request->get('serial'); $date_expire_string = $req->request->get('date_expire'); $date_pur_string = $req->request->get('date_purchase'); $warr_class = $req->request->get('warranty_class');