mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
commit
5b8b480d23
1
NEWS
1
NEWS
@ -28,6 +28,7 @@ PHP NEWS
|
||||
- Standard:
|
||||
. Fixed bug #79930 (array_merge_recursive() crashes when called with array
|
||||
with single reference). (Nikita)
|
||||
. Fixed bug #79944 (getmxrr always returns true on Alpine linux). (Nikita)
|
||||
|
||||
- XML:
|
||||
. Fixed bug #79922 (Crash after multiple calls to xml_parser_free()). (cmb)
|
||||
|
@ -1135,7 +1135,7 @@ PHP_FUNCTION(dns_get_mx)
|
||||
}
|
||||
}
|
||||
php_dns_free_handle(handle);
|
||||
RETURN_TRUE;
|
||||
RETURN_BOOL(zend_hash_num_elements(Z_ARRVAL_P(weight_list)) != 0);
|
||||
}
|
||||
/* }}} */
|
||||
#endif /* HAVE_FULL_DNS_FUNCS */
|
||||
|
@ -10,15 +10,19 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$domains = array( 'mx1.tests.php.net', 'mx2.tests.php.net' );
|
||||
foreach ( $domains as $domain )
|
||||
{
|
||||
if ( getmxrr( $domain, $hosts, $weights ) )
|
||||
{
|
||||
echo "Hosts: " . count( $hosts ) . ", weights: " . count( $weights ) . "\n";
|
||||
}
|
||||
$domains = array(
|
||||
'mx1.tests.php.net',
|
||||
'mx2.tests.php.net',
|
||||
'qa.php.net',
|
||||
);
|
||||
foreach ($domains as $domain) {
|
||||
$result = getmxrr($domain, $hosts, $weights);
|
||||
echo "Result: " . ($result ? "true" : "false")
|
||||
. ", hosts: " . count( $hosts )
|
||||
. ", weights: " . count( $weights ) . "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Hosts: 1, weights: 1
|
||||
Hosts: 2, weights: 2
|
||||
Result: true, hosts: 1, weights: 1
|
||||
Result: true, hosts: 2, weights: 2
|
||||
Result: false, hosts: 0, weights: 0
|
||||
|
Loading…
Reference in New Issue
Block a user