[ticket/17383] Fix HELO/EHLO error in email messenger on PHP8

PHPBB-17383
This commit is contained in:
rxu 2024-08-15 23:47:37 +07:00
parent 9d64579dea
commit 6d0a965db2
No known key found for this signature in database
GPG key ID: 955F0567380E586A

View file

@ -1428,7 +1428,7 @@ class smtp_class
if (($addr = @gethostbyname($local_host)) !== $local_host)
{
// Able to resolve IP back to name
if (($name = @gethostbyaddr($addr)) !== $addr)
if (!empty($name = @gethostbyaddr($addr)) && $name !== $addr)
{
$local_host = $name;
}