From b6f2d95f8235290b3af9f7826de35100f2316d3d Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sat, 8 Sep 2012 09:54:39 +0200 Subject: [PATCH] Added check not empty location code in Inventory Locations. --- inventory/manage/locations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/manage/locations.php b/inventory/manage/locations.php index 0bae758..21b3f64 100644 --- a/inventory/manage/locations.php +++ b/inventory/manage/locations.php @@ -33,7 +33,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') //first off validate inputs sensible $_POST['loc_code'] = strtoupper($_POST['loc_code']); - if (strlen(db_escape($_POST['loc_code'])) > 7) //check length after conversion + if ((strlen(db_escape($_POST['loc_code'])) > 7) || empty($_POST['loc_code'])) //check length after conversion { $input_error = 1; display_error( _("The location code must be five characters or less long (including converted special chars).")); -- 2.30.2