Bug #3973 [Opn->Csd]: Static methods are called using an instance of the object.

From: Date: Sat, 02 Apr 2005 18:40:28 +0000
Subject: Bug #3973 [Opn->Csd]: Static methods are called using an instance of the object.
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5860@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=3973&edit=1 ID: 3973 Updated by: arnaud@limbourg.com Reported By: yasheshb at gmail dot com -Status: Open +Status: Closed Type: Bug Package: Documentation Operating System: Fedora Core 2 PHP Version: 5.0.3 New Comment: This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. Previous Comments: ------------------------------------------------------------------------ [2005-03-27 23:41:46] yasheshb at gmail dot com Description: ------------ while going thru the documentation of PEAR_ErrorStack http://pear.php.net/manual/en/core.pear.pear-errorstack.intro.php in the second example an error stack is being setup for the internal db package using the methodcall // use the callback $dbstack->setDefaultCallback(array(&$myobj, 'errorCallback')) this is incorrect since looking at the documentation of the above method http://pear.php.net/manual/en/core.pear.pear-errorstack.setdefaultcallback.php it mentions clearly "PEAR_ErrorStack::setDefaultCallback() -- Sets a default callback to be used by all error stacks" hence the callback will be for all error stacks and not only for dbstack. and secondly it is bad coding style to use an object to call a static method. "Note This function should be called statically." Thanks. Regards. Yashesh Bhatia. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=3973&edit=1

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