fix for log object does not exist in setup

This commit is contained in:
Miles Lott 2001-11-25 01:24:42 +00:00
parent aaf0b21cf8
commit 886f62667e

View File

@ -242,8 +242,12 @@
// connect to ldap server // connect to ldap server
if (! $ds = ldap_connect($host)) if (! $ds = ldap_connect($host))
{ {
$GLOBALS['phpgw']->log->message('F-Abort, Failed connecting to LDAP server'); /* log does not exist in setup(, yet) */
$GLOBALS['phpgw']->log->commit(); if(is_object($GLOBALS['phpgw']->log))
{
$GLOBALS['phpgw']->log->message('F-Abort, Failed connecting to LDAP server');
$GLOBALS['phpgw']->log->commit();
}
printf("<b>Error: Can't connect to LDAP server %s!</b><br>",$host); printf("<b>Error: Can't connect to LDAP server %s!</b><br>",$host);
return False; return False;