Doc #12057 [Com]: Non-static method DB::isError() should not be called static

From: Date: Wed, 23 May 2012 05:09:59 +0000
Subject: Doc #12057 [Com]: Non-static method DB::isError() should not be called static
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8681@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=12057&edit=1 ID: 12057 Comment by: connect2maddy Reported By: connect2maddy at hotmail dot com Summary: Non-static method DB::isError() should not be called static Status: Bogus Type: Documentation Problem Package: DB Operating System: Linux Package Version: 1.7.12 PHP Version: 5.2.4 New Comment: Is anyone solved that issue? Made lots and lots of searches about this issue and dint find anything good and still the error exists. Please help to solve this issue. Previous Comments: ------------------------------------------------------------------------ [2009-11-04 16:28:04] wstein I fully agree with brycenesbitt that there needs to be better documentation about this warning message. This is not specific to PEAR DB, but to much of PEAR... it needs to be clearer that PEAR is not PHP5 E_STRICT compatible... There's a clear amount of arrogance here in asserting "This is a bogus problem because PEAR is not E_STRICT compatible". ...Since PEAR is not E_STRICT compatible, IT SHOULD BE VERY EASY TO LEARN THAT PEAR IS NOT E_STRICT COMPATIBLE. Therefore, it should be properly documented. ------------------------------------------------------------------------ [2007-09-17 22:04:17] brycenesbitt Who said DB is supposed to be E_STRICT compatible? DB is however, supposed to be usable -- just consider how frustrating it is to use the package, run into this error, discover lots of people run into this error, but have no recourse to find an "approved" solution, or even an approved description of the issue. It's not like the error message is self-explanatory or anything. ------------------------------------------------------------------------ [2007-09-17 07:16:53] aharvey No, I'd suggest that the assumption not be made that PEAR DB is in any way E_STRICT compliant. I'm not going to endorse any sort of hack to work around an issue that, frankly, isn't one. Re-closing. ------------------------------------------------------------------------ [2007-09-16 23:30:09] brycenesbitt I'm not asking you to make DB strict compatible. And fiddling with the error level solution solved the problem, I'd never have bothered reporting this. It's not that easy, especially when the error level is set by a module you are calling. Setting E_STRICT as you propose DOES NOT SOLVE THE PROBLEM in the project I'm working on. And never mind php6 where E_ALL and E_STRICT are... I think... the same. The PEAR::DB documentation and FAQ say nothing of this issue, no matter how simple or complex the solution may be. Lots of people run into it. If you have a solution, why not add a FAQ entry, or document it? I'm currently having reasonably good luck getting JPGraph to work, without having to hack JPGraph itself, with: $db = new DB(); $db = $db->connect($dsn); if ($db->isError($db)) { die($db->message.'<br>'.$db->userinfo); } If you google you'll find one of the most common "solutions" is to hack DB.php and add the static keyword. Is that how the Pear::DB maintainers would suggest that it be done? ------------------------------------------------------------------------ [2007-09-16 15:17:56] berdir Disable E_STRICT error messages, for example with: error_reporting(E_ALL); As Adam has said, this is not a bug, DB can't be E_STRICT compatible, a change would break PHP4-compatibility ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=12057 -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=12057&edit=1

« previous php.pear.bugs (#8681) next »