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  
Comments Add Comment Add patch


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 : 17 - 13 = ?

 
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!