Skip to content

Commit 07cb665

Browse files
committed
Fixed bug #80077
Quoting from the bug report: > The domain names passed to getmxrr() do not contain a trailing dot. > DNS lookups which do not find records will (depending on the local > resolver config) try again by adding the local domain to the end of > the searched host/domain. In many environments there's an mx record > for any subdomain of the local domain and the MX query will return > a hit. But the test expects no hit. So the test fails when checking > that "qa.php.net" does not have an MX record in DNS. In our local > environment the resolver falls back to also check qa.php.net.kippdata.de > which does have an MX record. Using "qa.php.net." instead of "qa.php.net" > should fix this for everyone.
1 parent e8d36ce commit 07cb665

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ PHP NEWS
2525

2626
- Standard:
2727
. Fixed bug #79986 (str_ireplace bug with diacritics characters). (cmb)
28+
. Fixed bug #80077 (getmxrr test bug). (Rainer Jung)
2829

2930
03 Sep 2020, PHP 7.3.22
3031

ext/standard/tests/network/getmxrr.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
1111
--FILE--
1212
<?php
1313
$domains = array(
14-
'mx1.tests.php.net',
15-
'mx2.tests.php.net',
16-
'qa.php.net',
14+
'mx1.tests.php.net.',
15+
'mx2.tests.php.net.',
16+
'qa.php.net.',
1717
);
1818
foreach ($domains as $domain) {
1919
$result = getmxrr($domain, $hosts, $weights);

0 commit comments

Comments
 (0)