Skip to content

Commit ec6a10c

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: (30 commits) [HttpKernel] Add support for configuring log level, and status code by exception class Add return types to HttpCache createSurrogate and createStore methods [Serializer] Fix denormalizing of array with empty body Fix framework configuration when messenger uses without console [Security] Remove annoying deprecation in `UsageTrackingTokenStorage` [Mailer] Improve error message when STARTTLS fails [Security] Add alias for FirewallMapInterface to @security.firewall.map Bump Symfony version to 5.3.10 Update VERSION for 5.3.9 Fix CHANGELOG Update CHANGELOG for 5.3.9 Bump Symfony version to 4.4.33 Update VERSION for 4.4.32 Fix CHANGELOG Update CHANGELOG for 4.4.32 [Workflow] Remove dead code in XML schemas [Runtime] Fix test for env var names Bump Symfony version to 5.3.9 Update VERSION for 5.3.8 Update CHANGELOG for 5.3.8 ...
2 parents 2c4b9d4 + 01d8181 commit ec6a10c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Transport/Smtp/Stream/SocketStream.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ public function initialize(): void
167167

168168
public function startTLS(): bool
169169
{
170-
return (bool) stream_socket_enable_crypto($this->stream, true);
170+
set_error_handler(function ($type, $msg) {
171+
throw new TransportException('Unable to connect with STARTTLS: '.$msg);
172+
});
173+
try {
174+
return stream_socket_enable_crypto($this->stream, true);
175+
} finally {
176+
restore_error_handler();
177+
}
171178
}
172179

173180
public function terminate(): void

0 commit comments

Comments
 (0)