Skip to content

Commit 0ddfbdd

Browse files
authored
Fix empty response error for blank lines (#274)
* Fix empty response error for blank lines * better checking against false
1 parent 68eaf30 commit 0ddfbdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Connection/Protocols/ImapProtocol.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function nextLine(): string {
108108
while (($next_char = fread($this->stream, 1)) !== false && $next_char !== "\n") {
109109
$line .= $next_char;
110110
}
111-
if ($line === "") {
111+
if ($line === "" && $next_char === false) {
112112
throw new RuntimeException('empty response');
113113
}
114114
if ($this->debug) echo "<< ".$line."\n";

0 commit comments

Comments
 (0)