Skip to content

Commit

Permalink
Protocol exception handling improved (bad response message added) #408
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Jun 23, 2023
1 parent df4f3c3 commit 50b4ea1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Fixed
- Legacy protocol support fixed (object to array conversion) #411
- Header value decoding improved #410
- Protocol exception handling improved (bad response message added) #408

### Added
- NaN
Expand Down
4 changes: 2 additions & 2 deletions src/Connection/Protocols/ImapProtocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ public function readResponse(Response $response, string $tag, bool $dontParse =
if ($tokens[0] == 'OK') {
return $lines ?: [true];
} elseif ($tokens[0] == 'NO' || $tokens[0] == 'BAD' || $tokens[0] == 'BYE') {
throw new ImapServerErrorException();
throw new ImapServerErrorException(implode("\n", $tokens));
}

throw new ImapBadRequestException();
throw new ImapBadRequestException(implode("\n", $tokens));
}

/**
Expand Down

0 comments on commit 50b4ea1

Please sign in to comment.