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

Bug #8238 bind only accepts direct ancestor of DB_Table object, shoul accept any subclass
Submitted: 2006-07-18 14:04 UTC
From: gramlich at eosc dot de Assigned: wiesemann
Status: Closed Package: Structures_DataGrid_DataSource_DBTable (version 0.1.1)
PHP Version: 4.3.2 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2006-07-18 14:04 UTC] gramlich at eosc dot de (Gregor Gramlich)
Description: ------------ In DataGrid->_detectSourceType() any subclass is allowed. This is the desired behaviour. It is not done like this in DBTable (maybe applies to other sources, too). Please change line 103 in DBTable.php not to use get_parent_class --- DBTableBAK.php 2006-07-06 17:39:29.000000000 +0200 +++ DBTable.php 2006-07-18 15:57:18.372794780 +0200 @@ -100,7 +100,7 @@ */ function bind(&$object, $options=array()) { - if (strtolower(get_parent_class($object)) == 'db_table') { + if (is_object($object) && is_subclass_of($object, 'db_table')) { $this->_object =& $object; } else { return PEAR::raiseError(

Comments

 [2006-07-18 14:58 UTC] wiesemann (Mark Wiesemann)
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.