More verbose error reporting.
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 28 Mar 2000 19:28:03 +0000 (19:28 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 28 Mar 2000 19:28:03 +0000 (19:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@353 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/addressbook.php

index c57fdb241ce81c6f24a6d9a5b6b4de4eccb4f5e8..5ba87caa90514c8bb1d5ca1af9e13c0ab07f7a09 100644 (file)
 
       // Load configured LDAP servers
       reset($ldap_server);
-      while(list($key,$param) = each($ldap_server))
-        if(is_array($param))
-           $abook->add_backend("ldap_server", $param);
+      while(list($key,$param) = each($ldap_server)) {
+        if(is_array($param)) {
+           $r = $abook->add_backend("ldap_server", $param);
+            if(!$r) {
+              printf("&nbsp;"._("Error initializing LDAP server %s:")."<BR>\n",
+                     $param["host"]);
+              printf("&nbsp;".$abook->error);
+              exit;
+            }
+         }
+      }
 
       // Return the initialized object
       return $abook;