From d272a820426e74581146e0ea5fb57a61bf2f3df7 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 21 Oct 2005 20:50:48 +0000 Subject: [PATCH] bug #1330847 --- ChangeLog | 1 + libraries/common.lib.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e6be3017..ce19b333f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ $Source$ 2005-10-21 Marc Delisle * libraries/relation.lib.php: foreign dropdowns: sort id-content by id and content-id by content + * libraries/common.lib.php: bug #1330847, undefined index connect_type 2005-10-21 Sebastian Mendel * db_details_export.php: diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 1b358d153..c596ca6dd 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1273,9 +1273,10 @@ if ($is_minimum_common == FALSE) { /** * Gets the valid servers list and parameters */ + foreach ($cfg['Servers'] AS $key => $val) { // Don't use servers with no hostname - if ( ($val['connect_type'] == 'tcp') && empty($val['host'])) { + if ( isset($val['connect_type']) && ($val['connect_type'] == 'tcp') && empty($val['host'])) { unset($cfg['Servers'][$key]); } @@ -1284,7 +1285,7 @@ if ($is_minimum_common == FALSE) { // and there is nothing in the verbose server name // or the host field, then generate a name for the server // in the form of "Server 2", localized of course! - if ( ($val['connect_type'] == 'socket') && empty($val['host']) && empty($val['verbose']) ) { + if ( isset($val['connect_type']) && $val['connect_type'] == 'socket' && empty($val['host']) && empty($val['verbose']) ) { $cfg['Servers'][$key]['verbose'] = $GLOBALS['strServer'] . $key; $val['verbose'] = $GLOBALS['strServer'] . $key; }