Skip to content

Commit ea9e854

Browse files
authored
Update AbstractStream.php
1 parent 3d49d0f commit ea9e854

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,7 @@ public function readLine(): string
8888
throw new TransportException(\sprintf('Connection to "%s" has been closed unexpectedly.', $this->getReadConnectionDescription()));
8989
}
9090
if (false === $line) {
91-
if ($this->getReadConnectionDescription() && error_get_last()) {
92-
$error = $this->getReadConnectionDescription().error_get_last()['message'];
93-
} else {
94-
$error = $this->getReadConnectionDescription().error_get_last();
95-
}
96-
throw new TransportException(\sprintf('Unable to read from connection to "%s": ', $error));
91+
throw new TransportException(\sprintf('Unable to read from connection to "%s": ', $this->getReadConnectionDescription().error_get_last()['message'] ?? ''));
9792
}
9893
}
9994

0 commit comments

Comments
 (0)