Home » Database » DB_DataObject » Bug #5486
DB_DataObject 'class_prefix' configuration option is mandatory
Details
| Submitted | 2005-09-22 03:36 UTC |
|---|---|
| From | roger at ecstatic dot com |
| Assigned | alan_k |
| Status | No Feedback |
| Package | DB_DataObject |
| PHP Version | 4.3.11 |
| Roadmaps | (Not assigned) |
Comments
[2005-09-22 03:36 UTC] roger at ecstatic dot com
Description:
------------
I want my persistent classes to have the same names as
the underlying tables, so I set 'class_prefix' to the
empty string. This works great...except that I happen
to have a table called 'Factory'. Calling
DB_DataObject::Factory() with an argument of 'Factory'
causes a segmentation fault. :-(
In the discussion for bug #3256, I see a
reference to this being a design decision. Fair enough;
but it's not made explicit in the documentation.
See bug #5484 for DB_DataObject.
[2005-11-06 09:37 UTC] roger at ecstatic dot com
Without having gone deep into debugging it, it's fairly
obvious how this might happen--it's no doubt a stack
overflow as 'Factory' gets evaluated repeatedly until
memory runs out. But, you needn't take my word for it--
just create a table called 'Factory', run createTables,
and try "DB_DataObject::Factory('Factory')."
I'd already turned overloading off, having been bitten
by PHP bug 25831 (which really ought to be pointed out
in the DB_DataObject docs).