mirror of
https://github.com/php/php-src.git
synced 2026-04-27 18:23:26 +02:00
45f52285f6
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.
16 lines
268 B
PHP
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
|