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

Bug #4135 _build_condition() bug?
Submitted: 2005-04-13 08:31 UTC
From: mipo at amatrica dot lt Assigned: alan_k
Status: Closed Package: DB_DataObject
PHP Version: 4.3.10 OS: Windows 2000
Roadmaps: (Not assigned)    
Subscription  


 [2005-04-13 08:31 UTC] mipo at amatrica dot lt
Description: ------------ If last line of _build_condition() reached wrong things happen. In my case I use mysql tinyint(1) as boolean. Line 2259 should be changed from: $this->whereAdd(" $kSql = ".intval($v)); to: $this->whereAdd(" $kSql = ".intval($this->$k)); I have found #2519 bug which says it is solved. But latest version from cvs doesn't solve my problem. Reproduce code: --------------- ini: [mytable1] ... myfield2 = 145 ... php: $do = &DB_DataObject::factory('mytable1'); $do->myfield2 = true; $do->find(); Expected result: ---------------- SELECT ... FROM mytable1 WHERE mytable1.myfield2 = 1 Actual result: -------------- SELECT ... FROM mytable1 WHERE mytable1.myfield2 = 145

Comments

 [2005-04-13 08:37 UTC] alan_k
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.