- When saving committee orders, don't iterate through the order array if a

committee has no members.  Doing so just generates a PHP error.
This commit is contained in:
dave 2008-01-07 05:38:44 +00:00
parent 3cba628b51
commit 8c4b77cf41

View File

@ -139,7 +139,11 @@ if($_POST['committees_id'] && $_POST['committees_ord'])
$ctitle = $titles[$cid]; $ctitle = $titles[$cid];
$cord = $pords[$cid]; $cord = $pords[$cid];
/* If the committee has no members, don't bother trying to do
* anything */
if(!is_array($ctitle)) continue;
foreach($ctitle as $uid=>$title) { foreach($ctitle as $uid=>$title) {
$o = intval($cord[$uid]); $o = intval($cord[$uid]);
$t = mysql_escape_string(stripslashes($title)); $t = mysql_escape_string(stripslashes($title));