Doc #52456 [NEW]: dns_get_record fourth parameter is not optional in 5.2

From: Date: Tue, 27 Jul 2010 13:17:25 +0000
Subject: Doc #52456 [NEW]: dns_get_record fourth parameter is not optional in 5.2
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4748@lists.php.net to get a copy of this message
From: Operating system: Centos 5.5 PHP version: 5.2.14 Package: Documentation problem Bug Type: Documentation Problem Bug description:dns_get_record fourth parameter is not optional in 5.2 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 bug report at http://bugs.php.net/bug.php?id=52456&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52456&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52456&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52456&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52456&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52456&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52456&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52456&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52456&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52456&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52456&r=support Expected behavior: http://bugs.php.net/fix.php?id=52456&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52456&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52456&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52456&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52456&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52456&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52456&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52456&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52456&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52456&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52456&r=mysqlcfg

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