Bug #5486 [Fbk->Opn]: DB_DataObject 'class_prefix' configuration option is mandatory

From: Date: Sun, 06 Nov 2005 09:37:20 +0000
Subject: Bug #5486 [Fbk->Opn]: DB_DataObject 'class_prefix' configuration option is mandatory
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7152@lists.php.net to get a copy of this message
Edit report at http://pecl.php.net/bugs/bug.php?id=5486&edit=1 ID: 5486 User updated by: roger at ecstatic dot com Reported By: roger at ecstatic dot com -Status: Feedback +Status: Open Type: Bug Package: Documentation PHP Version: 4.3.11 Assigned To: alan_k New Comment: 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). Previous Comments: ------------------------------------------------------------------------ [2005-10-25 00:37:16] alan at akbkhome dot com The code should cope with empty class_prefixes.. - I could not see why it should segfault, it's probably worth trying with overloading disabled. - and see what happens. ------------------------------------------------------------------------ [2005-09-21 23:36:02] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://pecl.php.net/bugs/bug.php?id=5486&edit=1

« previous php.pear.doc (#7152) next »