aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_styles.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-19 00:25:03 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-19 00:25:03 +0000
commitc3801d4d3a06855020237d80f4208fb39ec75322 (patch)
tree2d018eb5562c59af8ce1e01969827a9357114a62 /phpBB/admin/admin_styles.php
parent14b6e1447da88a3f3174058400368c2ba7a22613 (diff)
downloadforums-c3801d4d3a06855020237d80f4208fb39ec75322.tar
forums-c3801d4d3a06855020237d80f4208fb39ec75322.tar.gz
forums-c3801d4d3a06855020237d80f4208fb39ec75322.tar.bz2
forums-c3801d4d3a06855020237d80f4208fb39ec75322.tar.xz
forums-c3801d4d3a06855020237d80f4208fb39ec75322.zip
Fix 'each' warning, bug #528254
git-svn-id: file:///svn/phpbb/trunk@2332 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_styles.php')
-rw-r--r--phpBB/admin/admin_styles.php25
1 files changed, 9 insertions, 16 deletions
diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php
index 75ac5d318d..0d15d94983 100644
--- a/phpBB/admin/admin_styles.php
+++ b/phpBB/admin/admin_styles.php
@@ -504,7 +504,13 @@ switch( $mode )
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
@@ -517,27 +523,14 @@ switch( $mode )
message_die(GENERAL_ERROR, "Could not get data from themes name table", "", __LINE__, __FILE__, $sql);
}
- $selected_names = $db->sql_fetchrow($result);
-
- reset($selected_values);
- //$selected = array_merge($selected_values, $selected_names);
- if(count($selected_values))
+ if ( $selected_names = $db->sql_fetchrow($result) )
{
- 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;
- }
- }
-
$s_hidden_fields = '<input type="hidden" name="style_id" value="' . $style_id . '" />';
}
else