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

Bug #4535 postgresql's boolean still broken
Submitted: 2005-06-06 08:41 UTC
From: daniel at konczyk dot net Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.3.10 OS: debian gnu/linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-06 08:41 UTC] daniel at konczyk dot net
Description: ------------ Handling of boolean values in postgresql database is still broken in db_dataobject look at the current CVS, method 'update', line 1198 ($v & DB_DATAOBJECT_BOOL) ? (int)(bool)$this->$k : $this->$k when you select boolean field from postgresql, then the result value will be (let's assume there's 'not null' flag) 't' for true or 'f' for false then piece of code above will always return true, in this example it will return 1 and thus will update all boolean fields that do not appear in posted data to true... unless I overlooked something

Comments

 [2005-06-16 02:11 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-06-16 08:14 UTC] daniel at konczyk dot net
Well, you have to make a dirty patch for postgresql I think. I know you don't like it and you have already told us a zillion times about it, but as that's the only way I guess, as this is postgresql-only 'feature' Actually, you have to take care of false only, for example ($v & DB_DATAOBJECT_BOOL) ? (int)(bool)($this->$k == 'f'?0:$this->$k) : $this->$k or so I know it looks awful, but I'd better it looks so, than do not work at all..
 [2005-06-25 03:27 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!