From: Jan Schneider Date: Fri, 17 Sep 2010 23:17:13 +0000 (+0200) Subject: Style, use Horde_Exception_NotFound. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5c3f79af7972721f0cb019ceea653269fd155083;p=horde.git Style, use Horde_Exception_NotFound. --- diff --git a/framework/Ldap/lib/Horde/Ldap.php b/framework/Ldap/lib/Horde/Ldap.php index 2e2b9bd20..621004b40 100644 --- a/framework/Ldap/lib/Horde/Ldap.php +++ b/framework/Ldap/lib/Horde/Ldap.php @@ -999,21 +999,21 @@ class Horde_Ldap * sure the attribute type exists. * * @param string $dn DN of the entry that should be fetched. - * @param array $attr Array of Attributes to select. If ommitted, all + * @param array $attributes Array of Attributes to select. If ommitted, all * attributes are fetched. * * @return Horde_Ldap_Entry A Horde_Ldap_Entry object. * @throws Horde_Ldap_Exception */ - public function getEntry($dn, $attr = array()) + public function getEntry($dn, $attributes = array()) { - if (!is_array($attr)) { - $attr = array($attr); + if (!is_array($attributes)) { + $attributes = array($attributes); } $result = $this->search($dn, '(objectClass=*)', - array('scope' => 'base', 'attributes' => $attr)); + array('scope' => 'base', 'attributes' => $attributes)); if (!$result->count()) { - throw new Horde_Ldap_Exception('Could not fetch entry '.$dn.': no entry found'); + throw new Horde_Exception_NotFound(sprintf('Could not fetch entry %s: no entry found', $dn)); } $entry = $result->shiftEntry(); if (!$entry) {