Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.7

Bug #5339 Wrong test in Net_DNS_RR_NAPTR::rdatastr()
Submitted: 2005-09-08 09:20 UTC Modified: 2005-11-22 06:11 UTC
From: vena at switch dot ch Assigned: bate
Status: Closed Package: Net_DNS
PHP Version: 5.0.5 OS: ALL
Roadmaps: (Not assigned)    
Subscription  


 [2005-09-08 09:20 UTC] vena at switch dot ch
Description: ------------ The test "if ($this->port)" in Net_DNS_RR_NAPTR::rdatastr() is wrong, because you don't have in all cases the variable port set. A more appropriate test would be "if ($this->rdata)", because this is what you actually want. Test script: --------------- <?php require_once 'Net/DNS.php'; $resolver = new Net_DNS_Resolver(); $response = $resolver->query('7.6.5.1.8.6.2.4.4.1.4.e164.arpa.', 'NAPTR'); if ($response) { foreach ($response->answer as $rr) { $rr->display(); } } echo 'ok'; ?> Expected result: ---------------- display() should return the string with the data of the response and not just "no-data".

Comments

 [2005-11-22 06:11 UTC] bate
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.