Skip to content

Commit

Permalink
Throw NotFound.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Feb 13, 2015
1 parent 74c5947 commit 98f7824
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions turba/lib/Driver/Ldap.php
Expand Up @@ -227,7 +227,7 @@ protected function _search(array $criteria, array $fields, array $blobFields = a
* @since 4.2.0
*
* @return array Hash containing the search results.
* @throws Turba_Exception
* @throws Horde_Exception_NotFound
*/
protected function _read($key, $ids, $owner, array $fields,
array $blobFields = array(),
Expand Down Expand Up @@ -261,7 +261,7 @@ protected function _read($key, $ids, $owner, array $fields,
if ($res) {
$results = array_merge($results, $this->_getResults($fields, $res));
} else {
throw new Turba_Exception(sprintf(_("Read failed: (%s) %s"), ldap_errno($this->_ds), ldap_error($this->_ds)));
throw new Horde_Exception_NotFound(sprintf(_("Read failed: (%s) %s"), ldap_errno($this->_ds), ldap_error($this->_ds)));
}
}

Expand All @@ -270,7 +270,7 @@ protected function _read($key, $ids, $owner, array $fields,

$res = @ldap_read($this->_ds, Horde_String::convertCharset($this->_params['root'], 'UTF-8', $this->_params['charset']), $filter, $attr);
if (!$res) {
throw new Turba_Exception(sprintf(_("Read failed: (%s) %s"), ldap_errno($this->_ds), ldap_error($this->_ds)));
throw new Horde_Exception_NotFound(sprintf(_("Read failed: (%s) %s"), ldap_errno($this->_ds), ldap_error($this->_ds)));
}

return $this->_getResults($fields, $res);
Expand Down

0 comments on commit 98f7824

Please sign in to comment.