Pass error number.
authorJan Schneider <jan@horde.org>
Tue, 14 Sep 2010 21:06:38 +0000 (23:06 +0200)
committerJan Schneider <jan@horde.org>
Fri, 17 Sep 2010 12:29:16 +0000 (14:29 +0200)
framework/Ldap/lib/Horde/Ldap.php

index 0830681..939fa4e 100644 (file)
@@ -235,8 +235,7 @@ class Horde_Ldap
             $msg = @ldap_bind($this->_link, $dn, $password);
         }
         if (!$msg) {
-            throw new Horde_Ldap_Exception('Bind failed: ' .
-                                           @ldap_error($this->_link),
+            throw new Horde_Ldap_Exception('Bind failed: ' . @ldap_error($this->_link),
                                            @ldap_errno($this->_link));
         }
     }
@@ -505,7 +504,8 @@ class Horde_Ldap
         }
 
         if (!@ldap_start_tls($this->_link)) {
-            throw new Horde_Ldap_Exception('TLS not started: ' . @ldap_error($this->_link));
+            throw new Horde_Ldap_Exception('TLS not started: ' . @ldap_error($this->_link),
+                                           @ldap_errno($this->_link));
         }
     }