Skip to content

Commit 9857984

Browse files
committed
Potential imap_close() error fixed #118
1 parent 48f1633 commit 9857984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IMAP/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function connect($attempts = 3) {
237237
* @return $this
238238
*/
239239
public function disconnect() {
240-
if ($this->isConnected() && $this->connection !== false) {
240+
if ($this->isConnected() && $this->connection !== false && is_integer($this->connection) === false) {
241241
$this->errors = array_merge($this->errors, imap_errors() ?: []);
242242
$this->connected = !imap_close($this->connection, CL_EXPUNGE);
243243
}

0 commit comments

Comments
 (0)