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

Bug #2123 Record_DataObject does not recognize DataObject's grand-children
Submitted: 2004-08-14 16:14 UTC Modified: 2006-12-26 22:31 UTC
From: ylf at xung dot org Assigned: asnagy
Status: Closed Package: Structures_DataGrid
PHP Version: 4.3.4 OS: Linux Debian (testing)
Roadmaps: (Not assigned)    
Subscription  


 [2004-08-14 16:14 UTC] ylf at xung dot org
Description: ------------ Hi Andrew, In DG_R_DO::setRecord() you state : if (strtolower(get_parent_class($data)) == 'db_dataobject') This is wrong as it's possible (and common) to use an intermediate class as below : class DO_Common extends DB_DataObject { } class User extends DO_Common { } See: with setRecord($user), get_parent_class will return "DO_Common". You need to use : is_subclass_of($data,'db_dataobject') -- Olivier Guilyardi

Comments

 [2004-08-16 10:50 UTC] asnagy at webitecture dot org
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.