From: Ben Klang Date: Mon, 21 Dec 2009 01:23:10 +0000 (-0500) Subject: One missed PEAR::raiseException -> throw X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cdc9a1b73103e0f8d438b6ae04fc154d239a9bf6;p=horde.git One missed PEAR::raiseException -> throw One missed PEAR::raiseException -> throw And add the LDAP error number to the thrown objects for good measure. --- diff --git a/framework/Prefs/lib/Horde/Prefs/Ldap.php b/framework/Prefs/lib/Horde/Prefs/Ldap.php index 8a0e3d0b4..11874bf3c 100644 --- a/framework/Prefs/lib/Horde/Prefs/Ldap.php +++ b/framework/Prefs/lib/Horde/Prefs/Ldap.php @@ -176,7 +176,7 @@ class Horde_Prefs_Ldap extends Horde_Prefs @ldap_errno($conn), @ldap_error($conn)), __FILE__, __LINE__, PEAR_LOG_ERR); - throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.'); + throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.', @ldap_errno($conn)); } } @@ -189,7 +189,7 @@ class Horde_Prefs_Ldap extends Horde_Prefs @ldap_errno($conn), @ldap_error($conn)), __FILE__, __LINE__, PEAR_LOG_WARNING); - return PEAR::raiseError(_("Internal LDAP error. Details have been logged for the administrator.")); + throw new Horde_Exception(_("Internal LDAP error. Details have been logged for the administrator."), @ldap_errno($conn)); } } @@ -205,7 +205,7 @@ class Horde_Prefs_Ldap extends Horde_Prefs @ldap_errno($this->_connection), @ldap_error($this->_connection)), __FILE__, __LINE__, PEAR_LOG_ERR); - throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.'); + throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.', @ldap_errno($conn)); } $result = @ldap_get_entries($this->_connection, $search); @@ -215,7 +215,7 @@ class Horde_Prefs_Ldap extends Horde_Prefs @ldap_errno($this->_connection), @ldap_error($this->_connection)), __FILE__, __LINE__, PEAR_LOG_ERR); - throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.'); + throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.', @ldap_errno($this->_connection)); } if ($result['count'] != 1) { @@ -253,7 +253,7 @@ class Horde_Prefs_Ldap extends Horde_Prefs @ldap_errno($this->_connection), @ldap_error($this->_connection)), __FILE__, __LINE__, PEAR_LOG_ERR); - throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.'); + throw new Horde_Exception('Internal LDAP error. Details have been logged for the administrator.', @ldap_Errno($this->_connection)); } // We now have a ready-to-use connection.