From a23548d6b1bc8cc3361cf34b5d95e5d4402d9804 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 22 Oct 2009 12:01:34 +0000 Subject: [PATCH] Fixed error on add/update with no tags selected. --- dimensions/dimension_entry.php | 6 +++--- gl/manage/gl_accounts.php | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dimensions/dimension_entry.php b/dimensions/dimension_entry.php index 626d8466..0ff4a56e 100644 --- a/dimensions/dimension_entry.php +++ b/dimensions/dimension_entry.php @@ -154,16 +154,16 @@ function can_process() if (isset($_POST['ADD_ITEM']) || isset($_POST['UPDATE_ITEM'])) { - + if (!isset($_POST['dimension_tags'])) + $_POST['dimension_tags'] = array(); + if (can_process()) { if ($selected_id == -1) { - $id = add_dimension($_POST['ref'], $_POST['name'], $_POST['type_'], $_POST['date_'], $_POST['due_date'], $_POST['memo_']); add_tag_associations($id, $_POST['dimension_tags']); - meta_forward($_SERVER['PHP_SELF'], "AddedID=$id"); } else diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 02a78bc7..1f6786ef 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -71,6 +71,9 @@ if (isset($_POST['add']) || isset($_POST['update'])) if ($accounts_alpha == 2) $_POST['account_code'] = strtoupper($_POST['account_code']); + if (!isset($_POST['account_tags'])) + $_POST['account_tags'] = array(); + if ($selected_account) { if (update_gl_account($_POST['account_code'], $_POST['account_name'], -- 2.30.2