Skip to content

Commit

Permalink
This should be a NotFound exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 13, 2017
1 parent edff052 commit 78bbe2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
v4.2.19-git
-----------

[jan] Fix fatal error if group contacts from an LDAP server don't exist
anymore.


-------
Expand Down
4 changes: 2 additions & 2 deletions lib/Driver/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,13 @@ protected function _buildSearchQuery(array $criteria)
* @param resource $res Result identifier.
*
* @return array Hash containing the results.
* @throws Turba_Exception
* @throws Horde_Exception_NotFound
*/
protected function _getResults(array $fields, $res)
{
$entries = @ldap_get_entries($this->_ds, $res);
if ($entries === false) {
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 only the requested fields (from $fields, above). */
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</stability>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Fix fatal error if group contacts from an LDAP server don&apos;t exist anymore.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -2178,7 +2178,7 @@
<date>2016-12-16</date>
<license uri="http://www.horde.org/licenses/apache">ASL</license>
<notes>
*
* [jan] Fix fatal error if group contacts from an LDAP server don&apos;t exist anymore.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 78bbe2d

Please sign in to comment.