From cdc9a1b73103e0f8d438b6ae04fc154d239a9bf6 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sun, 20 Dec 2009 20:23:10 -0500 Subject: [PATCH] One missed PEAR::raiseException -> throw One missed PEAR::raiseException -> throw And add the LDAP error number to the thrown objects for good measure. --- framework/Prefs/lib/Horde/Prefs/Ldap.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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. -- 2.11.0