Doc #52456 [Opn->Csd]: dns_get_record fourth parameter is not optional in 5.2

From: Date: Mon, 09 Aug 2010 11:11:44 +0000
Subject: Doc #52456 [Opn->Csd]: 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-4816@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 Updated by: aharvey@php.net Reported by: temp at umbrellasource dot com Summary: dns_get_record fourth parameter is not optional in 5.2 -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Centos 5.5 PHP Version: 5.2.14 -Assigned To: +Assigned To: aharvey Block user comment: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2010-08-09 13:11:41] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302030 Log: Fix doc bug #52456 (dns_get_record fourth parameter is not optional in 5.2). ------------------------------------------------------------------------ [2010-07-27 15:20:32] temp at umbrellasource dot com 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. ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#4816) next »