1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/17135] Fix invalid smtp in tests

PHPBB3-17135
This commit is contained in:
rxu
2023-05-05 21:24:15 +07:00
parent df5ab5b5d8
commit 715496b76d
2 changed files with 3 additions and 3 deletions

View File

@@ -581,7 +581,7 @@ class messenger
*/
function get_transport($dummy = false)
{
if ($dummy)
if ($dummy || empty($this->config['smtp_host']))
{
$dsn = 'null://null';
}
@@ -600,7 +600,7 @@ class messenger
$transport = Transport::fromDsn($dsn);
if ($this->config['smtp_delivery'])
if ($this->config['smtp_delivery'] && $dsn != 'null://null')
{
// Set ssl context options, see http://php.net/manual/en/context.ssl.php
$verify_peer = (bool) $this->config['smtp_verify_peer'];