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  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2006-12-03 11:32 UTC
Package:
Bug Type:
Summary:
From: roger at ecstatic dot com
New email:
PHP Version: Package Version: OS:

 

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