diff --git a/ChangeLog b/ChangeLog index 2a7643985..892bd7374 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ $Source$ * libraries/select_server.lib.php: Move end of fieldset to correct place after button (patch #1450559). * libraries/plugin_interface.lib.php: Add support for hidden inputs. + * libraries/common.lib.php: Do not forget wrongly configured servers, + otherwise user gets warning only on first access (RFE #1451521). 2006-03-15 Michal Čihař * libraries/export/htmlexcel.php: Fix output handling (bug #1450555). diff --git a/libraries/common.lib.php b/libraries/common.lib.php index e1cc7c371..150c9e368 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2865,9 +2865,10 @@ if (!isset($cfg['Servers']) || count($cfg['Servers']) == 0) { $new_servers = array(); foreach ($cfg['Servers'] as $server_index => $each_server) { + + // Detect wrong configuration if (!is_int($server_index) || $server_index < 1) { $GLOBALS['PMA_errors'][] = sprintf($strInvalidServerIndex, $server_index); - continue; } $each_server = array_merge($default_server, $each_server); @@ -2875,7 +2876,6 @@ if (!isset($cfg['Servers']) || count($cfg['Servers']) == 0) { // Don't use servers with no hostname if ($each_server['connect_type'] == 'tcp' && empty($each_server['host'])) { $GLOBALS['PMA_errors'][] = sprintf($strInvalidServerHostname, $server_index); - continue; } // Final solution to bug #582890