Skip to content

Commit 04e622d

Browse files
committed
Suppress stream socket warnings and use raw error
1 parent 87fca56 commit 04e622d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Connection/Streams/ImapStream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ImapStream implements StreamInterface
1818
*/
1919
public function open(string $transport, string $host, int $port, int $timeout, array $options = []): bool
2020
{
21-
$this->stream = stream_socket_client(
21+
$this->stream = @stream_socket_client(
2222
"{$transport}://{$host}:{$port}",
2323
$errno,
2424
$errstr,
@@ -28,7 +28,7 @@ public function open(string $transport, string $host, int $port, int $timeout, a
2828
);
2929

3030
if (! $this->stream) {
31-
throw new ImapConnectionFailedException('Stream failed to open: '.$errstr, $errno);
31+
throw new ImapConnectionFailedException($errstr, $errno);
3232
}
3333

3434
return true;

0 commit comments

Comments
 (0)