]> git.sur5r.net Git - contagged/blobdiff - entry.php
catch a few more LDAP errors and display them in a nicer way
[contagged] / entry.php
index bb207ceb10e62d40a22faade43995ac6e9dfe9dd..524bb543b4dd7b1e444bed899fdaf553cc901176 100644 (file)
--- a/entry.php
+++ b/entry.php
@@ -89,8 +89,9 @@ function _fetchData($dn){
   global $smarty;
   global $users; //contains the users for manager role
 
-  $sr = ldap_search($LDAP_CON,$dn,'(objectClass=inetOrgPerson)');
-  if(!ldap_count_entries($LDAP_CON,$sr)){
+  $sr = @ldap_search($LDAP_CON,$dn,'(objectClass=inetOrgPerson)');
+  tpl_ldaperror();
+  if(!@ldap_count_entries($LDAP_CON,$sr)){
     return false;
   }
   $result = ldap_get_binentries($LDAP_CON, $sr);