Doc #52456 [Opn]: dns_get_record fourth parameter is not optional in 5.2
| From: | temp at umbrellasource dot com | Date: | Tue, 27 Jul 2010 13:20:33 +0000 |
| Subject: | Doc #52456 [Opn]: dns_get_record fourth parameter is not optional in 5.2 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4749@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52456&edit=1
ID: 52456
User updated by: temp at umbrellasource dot com
Reported by: temp at umbrellasource dot com
Summary: dns_get_record fourth parameter is not optional in
5.2
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Centos 5.5
PHP Version: 5.2.14
Block user comment: N
New Comment:
Forgot to finish my thought
Given that it does work with the fourth parameter I'd just update the
documentation that it does that in 5.2 and call it an undocumented
feature.
Previous Comments:
------------------------------------------------------------------------
[2010-07-27 15:17:22] temp at umbrellasource dot com
Description:
------------
There's some unexpected behavior to this function. According to
documentation, the fourth parameter is optional. However, if you include
the third parameter and omit the fourth, the function will error out
with a warning. Either the documentation is wrong or this is a bug in
5.2. Given that it does
This appears to be fixed as of 5.3.1 (tested on RHEL 6 beta)
Test script:
---------------
<?php
$ref = dns_get_record('php.net', DNS_A, $ns);
var_dump($ref);
?>
Expected result:
----------------
array(1) { [0]=> array(5) { ["host"]=> string(7) "php.net"
["type"]=>
string(1) "A" ["ip"]=> string(13) "69.147.83.197"
["class"]=>
string(2) "IN" ["ttl"]=> int(84264) } }
Actual result:
--------------
Warning: Wrong parameter count for dns_get_record()
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52456&edit=1