From 5c3f79af7972721f0cb019ceea653269fd155083 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sat, 18 Sep 2010 01:17:13 +0200 Subject: [PATCH] Style, use Horde_Exception_NotFound. --- framework/Ldap/lib/Horde/Ldap.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) { -- 2.11.0