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

Bug #5486 DB_DataObject 'class_prefix' configuration option is mandatory
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 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 24 + 2 = ?

 
 [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.

Comments

 [2005-10-25 04:37 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-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).
 [2006-01-23 04:49 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!