Home » Database » DB_DataObject_FormBuilder » Bug #7167
PostgreSQL boolean values rendering problem
Details
| Submitted | 2006-03-21 00:14 UTC |
|---|---|
| From | vshivak at php dot net |
| Assigned | justinpatrin |
| Status | Closed |
| Package | DB_DataObject_FormBuilder |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-03-21 00:14 UTC] vshivak at php dot net
Description:
------------
With PostgreSQL, boolean fields have 'f', or 't', not 1, or 0 as values.
When rendering checkbox for booleans in FormBuilder you expect input value 1, or 0, but from PostgreSQL comes f/t.
Fix is fairly easy. Following should go after line 1141 of FormBuilder.php (1.0.0RC4):
('f' === $formValues[$key]) ? $formValues[$key] = 0 : $formValues[$key] = 1;
Actually, Bug #4904 (http://pear.php.net/bugs/bug.php?id=4904) talks about this issue, but it is wrongly assigned to DB_DataObject, not to FormBuilder.