diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-08 09:58:35 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-08 10:00:49 +0200 |
commit | 07cb665515190be8319e77fa86d8f338c04e2c6b (patch) | |
tree | 2ee0c6e8928364666f98f0f84ee1ef0ad4ba8c93 | |
parent | e8d36ce7622c58100d8559b4603fc95d9d8cbd49 (diff) | |
download | php-git-07cb665515190be8319e77fa86d8f338c04e2c6b.tar.gz |
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.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/standard/tests/network/getmxrr.phpt | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -25,6 +25,7 @@ PHP NEWS - Standard: . Fixed bug #79986 (str_ireplace bug with diacritics characters). (cmb) + . Fixed bug #80077 (getmxrr test bug). (Rainer Jung) 03 Sep 2020, PHP 7.3.22 diff --git a/ext/standard/tests/network/getmxrr.phpt b/ext/standard/tests/network/getmxrr.phpt index 52228685b0..1a005dfdd9 100644 --- a/ext/standard/tests/network/getmxrr.phpt +++ b/ext/standard/tests/network/getmxrr.phpt @@ -11,9 +11,9 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php $domains = array( - 'mx1.tests.php.net', - 'mx2.tests.php.net', - 'qa.php.net', + 'mx1.tests.php.net.', + 'mx2.tests.php.net.', + 'qa.php.net.', ); foreach ($domains as $domain) { $result = getmxrr($domain, $hosts, $weights); |