Fix 'each' warning, bug #528254

git-svn-id: file:///svn/phpbb/trunk@2332 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-03-19 00:25:03 +00:00
parent 14b6e1447d
commit c3801d4d3a

View file

@ -504,7 +504,13 @@ switch( $mode )
message_die(GENERAL_ERROR, "Could not get data from themes table", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Could not get data from themes table", "", __LINE__, __FILE__, $sql);
} }
$selected_values = $db->sql_fetchrow($result); if ( $selected_values = $db->sql_fetchrow($result) )
{
while(list($key, $val) = @each($selected_values))
{
$selected[$key] = $val;
}
}
// //
// Fetch the Themes Name data // Fetch the Themes Name data
@ -517,22 +523,9 @@ switch( $mode )
message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql);
} }
$selected_names = $db->sql_fetchrow($result); if ( $selected_names = $db->sql_fetchrow($result) )
reset($selected_values);
//$selected = array_merge($selected_values, $selected_names);
if(count($selected_values))
{ {
while(list($key, $val) = each($selected_values)) while(list($key, $val) = @each($selected_names))
{
$selected[$key] = $val;
}
}
reset($selected_names);
if($selected_names)
{
while(list($key, $val) = each($selected_names))
{ {
$selected[$key] = $val; $selected[$key] = $val;
} }