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

Bug #5656 toValue( boolean_column ) not works
Submitted: 2005-10-11 14:29 UTC
From: xia at silvia dot com Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.3.11 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 : 36 + 37 = ?

 
 [2005-10-11 14:29 UTC] xia at silvia dot com
Description: ------------ toValue() method with boolean column name does not work. First, const "DB_DATAOBJECT_BOOLEAN" used in switch() statement, but declared const is "DB_DATAOBJECT_BOOL". And, method returns $cols[$col] but $this->$col. This part of method should be as: ---- case ($cols[$col] & DB_DATAOBJECT_BOOL): if ($cols[$col] & DB_DATAOBJECT_STR) { // it's a 't'/'f' ! return ($this->$col == 't'); } return (bool) $this->$col; ----

Comments

 [2005-10-12 02:08 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!
 [2005-10-12 02:21 UTC] xia at silvia dot com
Thanks, but, there were another bug. Method returns $cols[$col] now, but should return (bool)$this->$col or ($this->$col == 't'). Please fix it. And, I found one more, 'default' returns $this->col, but it should return $this->$col. Should I report it as new bug?
 [2005-10-12 03: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!