Skip to content

Commit

Permalink
Bypass no such object errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Feb 10, 2020
1 parent e12f58f commit cb8da53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/DetectsErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ protected function causedBySizeLimit($error)
return $this->errorContainsMessage($error, ['Partial search results returned', 'Size limit exceeded']);
}

/**
* Determine if the error was caused by a "No such object" warning.
*
* @param string $error
*
* @return bool
*/
protected function causedByNoSuchObject($error)
{
return $this->errorContainsMessage($error, ['No such object']);
}

/**
* Determine if the error contains the any of the messages.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ protected function executeFailableOperation(Closure $operation)
*/
protected function shouldBypassError($error)
{
return $this->causedByPaginationSupport($error) || $this->causedBySizeLimit($error);
return $this->causedByPaginationSupport($error) || $this->causedBySizeLimit($error) || $this->causedByNoSuchObject($error);
}

/**
Expand Down

0 comments on commit cb8da53

Please sign in to comment.