Skip to content

Commit cfacf84

Browse files
committed
Merge branch 'PHP-7.1'
* PHP-7.1: #73594 tests only check the extra params if dns_get_record is successful
2 parents bad55a7 + de32c9e commit cfacf84

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ext/standard/tests/network/bug73594.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ if (empty($out)) die("skip local resolver does not return additional records");
1919
<?php
2020
$auth = array();
2121
$additional = array();
22-
dns_get_record('php.net', DNS_MX, $auth, $additional);
23-
var_dump(empty($additional));
22+
$res = dns_get_record('php.net', DNS_MX, $auth, $additional);
23+
// only check $additional if dns_get_record is successful
24+
var_dump(!empty($res) && empty($additional));
2425
?>
2526
--EXPECT--
2627
bool(false)

ext/standard/tests/network/bug73594a.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ if (empty($out)) die("skip local resolver does not return authority records");
1818
--FILE--
1919
<?php
2020
$auth = array();
21-
dns_get_record('php.net', DNS_MX, $auth);
22-
var_dump(empty($auth));
21+
$res = dns_get_record('php.net', DNS_MX, $auth);
22+
// only check $auth if dns_get_record is successful
23+
var_dump(!empty($res) && empty($auth));
2324
?>
2425
--EXPECT--
2526
bool(false)

0 commit comments

Comments
 (0)