Skip to content

Commit 2e4649d

Browse files
committed
fix closing error.
1 parent 0523d34 commit 2e4649d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Transport/SmtpTransport.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ private function smtpCommand($command)
152152

153153
public function __destruct()
154154
{
155-
$this->smtpCommand("QUIT");
156-
fclose($this->socket);
155+
if (is_resource($this->socket)) {
156+
$this->smtpCommand("QUIT");
157+
fclose($this->socket);
158+
}
157159
}
158160
}

0 commit comments

Comments
 (0)