From 73f0a19adbf595f82e6110dec7eb685181dc0993 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 15 Dec 2015 05:34:54 -0800 Subject: [PATCH] Fixes #1459 - fieldset_id error if null --- app/controllers/admin/ModelsController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/ModelsController.php b/app/controllers/admin/ModelsController.php index 0204ba3d1f..a5d90365cf 100755 --- a/app/controllers/admin/ModelsController.php +++ b/app/controllers/admin/ModelsController.php @@ -243,8 +243,9 @@ class ModelsController extends AdminController $model->modelno = e(Input::get('modelno')); $model->manufacturer_id = e(Input::get('manufacturer_id')); $model->category_id = e(Input::get('category_id')); - //$model->show_mac_address = e(Input::get('show_mac_address', '0')); - $model->fieldset_id = e(Input::get('custom_fieldset')); + if (Input::get('custom_fieldset')!='') { + $model->fieldset_id = e(Input::get('custom_fieldset')); + } if (Input::file('image')) { $image = Input::file('image');