From: Janusz Dobrowolski Date: Sat, 8 Sep 2012 07:54:39 +0000 (+0200) Subject: Added check not empty location code in Inventory Locations. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b6f2d95f8235290b3af9f7826de35100f2316d3d;p=textcart.git Added check not empty location code in Inventory Locations. --- 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)."));