From 58ea16703eed30accc54a49a5185f10e36b0fe6a Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 1 Oct 2006 07:24:07 +0000 Subject: [PATCH] r1223: warnings-- --- admin/product.php | 19 +++++++++++-------- docs/changes.txt | 1 + 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/admin/product.php b/admin/product.php index 67f9ae7..1abeb74 100755 --- a/admin/product.php +++ b/admin/product.php @@ -314,18 +314,21 @@ if ($_REQUEST['do'] == 'editproduct') if ($_POST['do'] == 'displayorder') { $bugsys->input_clean('displayorder', TYPE_UINT); - foreach ($bugsys->in['displayorder'] AS $namebit => $displayorder) + if (is_array($bugsys->in['displayorder'])) { - $name = explode('_', $namebit); - if ($name[0] == 'product' OR $name[0] == 'version') + foreach ($bugsys->in['displayorder'] AS $namebit => $displayorder) { - $id = $bugsys->clean($name[1], TYPE_UINT); - $order = $displayorder; - $db->query("UPDATE " . TABLE_PREFIX . "$name[0] SET displayorder = $order WHERE $name[0]id = $id"); + $name = explode('_', $namebit); + if ($name[0] == 'product' OR $name[0] == 'version') + { + $id = $bugsys->clean($name[1], TYPE_UINT); + $order = $displayorder; + $db->query("UPDATE " . TABLE_PREFIX . "$name[0] SET displayorder = $order WHERE $name[0]id = $id"); + } } + build_products(); + build_versions(); } - build_products(); - build_versions(); $admin->redirect('product.php?do=modify'); } diff --git a/docs/changes.txt b/docs/changes.txt index 571c6b5..1cc9a9c 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -3,6 +3,7 @@ - When gettext is not installed, a "method call on unobject" error is thrown - Renamed "automatic action" to "automation" - If no user comment is entered but there's an automation comment, then the automation comment is no longer disregarded +- Get rid of a foreach() warning if there are no products [admin/product.php#317] 1.1.0 Release Candidate 1 =============================== -- 2.43.5