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

Bug #16504 Unable to create RR from array
Submitted: 2009-08-10 03:02 UTC
From: dmitrystolyarov Assigned: doconnor
Status: Closed Package: Net_DNS (version 1.0.1)
PHP Version: 5.2.10 OS: Gentoo Linux
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 - 33 = ?

 
 [2009-08-10 03:02 UTC] dmitrystolyarov (Dmitry Stolyarov)
Description: ------------ Creating RR with Net_DNS_RR::new_from_array doesn't work properly: * Typo in lines 223 & 224 (RR.php) makes function unable to find necessary class and returns object of base class. * Fixing the typo described above causes created objects to become empty (they contain name & ttl only) if rdata is missing in array but specific (for this type) fields are given (e.g. address for type A). Solving this problem caused to fix constructors of all RR classes. Patch is attached. Test script: --------------- $rr = Net_DNS_RR::new_from_array(array('type' => 'A', 'name' => 'example.com', 'ttl' => '3600' , 'address' => '192.168.0.15')); echo get_class($rr) . "\n"; Expected result: ---------------- Net_DNS_RR_A Actual result: -------------- Net_DNS_RR

Comments

 [2009-08-10 03:02 UTC] dmitrystolyarov (Dmitry Stolyarov)
The following patch has been added/updated: Patch Name: rr-from-array.patch Revision: 1249855359 URL: http://pear.php.net/bugs/patch-display.php?bug=16504&patch=rr-from-array.patch&revision=1249855359&display=1
 [2009-08-10 03:02 UTC] dmitrystolyarov (Dmitry Stolyarov)
-PHP Version: 5.2.5 +PHP Version: 5.2.10
 [2010-02-22 03:46 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified
 [2010-02-22 04:21 UTC] doconnor (Daniel O'Connor)
-Status: Verified +Status: Feedback
I've applied the patch in SVN. It's still not changing my windows unit test results - can you try the latest SVN revision
 [2010-03-18 23:02 UTC] dmitrystolyarov (Dmitry Stolyarov)
It works as expected (revision 296354).
 [2010-04-13 12:07 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. 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.