1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Files
archived-php-src/ext/standard/tests/network/bug81618.phpt
T
Matt 45f52285f6 Fix bug #81618: Correct dns_get_record on FreeBSD
Modify dns_get_record to test for records result based on dns_errno to
accommodate modern FreeBSD, for which res_nsearch() does not update
h_errno directly. Add new php_dns_errno macro, and have it consult
statp->res_h_errno when OS has res_nsearch().

Closes GH-7655.
2021-11-15 10:00:07 +01:00

16 lines
268 B
PHP

--TEST--
Bug #81618: dns_get_record failure on FreeBSD
--SKIPIF--
<?php
if (getenv('SKIP_ONLINE_TESTS')) die('skip online test');
?>
--FILE--
<?php
$ret = dns_get_record('www.google.com', DNS_A + DNS_CNAME);
echo ($ret !== false && count($ret) > 0);
?>
--EXPECT--
1