From cde824505e57106466d933c561cd4719b0c99ada Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 20 Nov 2005 12:43:50 +0000 Subject: [PATCH] fixed bug of not written domains under windows with new php's: It's a bit obscure: $deletedomain=''; $domain='default'; isset($deletedomain[$domain]) === true under linux this is NOT true fixed it by using: is_array($deletedomain) && isset($deletedomain[$domain]) --- setup/inc/class.setup_html.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/inc/class.setup_html.inc.php b/setup/inc/class.setup_html.inc.php index 4419b1978f..5baf5ba1a6 100644 --- a/setup/inc/class.setup_html.inc.php +++ b/setup/inc/class.setup_html.inc.php @@ -31,17 +31,17 @@ $deletedomain = get_var('deletedomain',Array('POST')); $domains = get_var('domains',Array('POST')); - @reset($domains); - while($domains && list($k,$v) = @each($domains)) + + foreach($domains as $k => $v) { - if(isset($deletedomain[$k])) + if(is_array($deletedomain) && isset($deletedomain[$k])) { continue; } $variableName = str_replace('.','_',$k); $dom = get_var('setting_'.$variableName,Array('POST')); $GLOBALS['header_template']->set_var('DB_DOMAIN',$v); - while(list($x,$y) = @each($dom)) + foreach($dom as $x => $y) { if(strtoupper($x) == 'CONFIG_PASS') {