Home » Database » DB_DataObject_FormBuilder » Bug #919
Autogenerated Elements fail to detect proper data Types
Details
| Submitted | 2004-02-27 13:08 UTC |
|---|---|
| From | bubik at acvyskov dot cz |
| Assigned | mw21st |
| Status | Closed |
| Package | DB_DataObject_FormBuilder |
| PHP Version | 4.3.3 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-02-27 13:08 UTC] bubik at acvyskov dot cz
Description:
------------
Data Types defined by DB_DataObject are:
define('DB_DATAOBJECT_INT', 1);
define('DB_DATAOBJECT_NOTNULL', 128);
When I have a Database Column of type INT and NOT NULL, the Type is 1+128=129.
Now FormBuilder.php examines types during autogeneration in this way:
---
switch ($type) {
case DB_DATAOBJECT_INT:
---
IMHO it should be written as "switch ($type & 127)" to detect both NULL and NOT NULL columns.
[2004-02-28 03:20 UTC] pear-dev at mocsnik dot hu
Already discussed in bug #624
http://pear.php.net/bugs/bug.php?id=624
Regards,
Norbert Mocsnik
[2004-03-14 18:02 UTC] mw21st at php dot net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.
Thank you for your interest in PEAR.
As Norbert already mentioned, this bug is submitted twice (http://pear.php.net/bugs/bug.php?id=624).
I'll close this one. The first report will be updated when this issue is resolved.
Thanks for the report anyway.