Req #17709 [Com]: Many Deprecated and E_STRICT warnings in MDB2
| From: | eric0043 | Date: | Wed, 25 Aug 2010 10:43:50 +0000 |
| Subject: | Req #17709 [Com]: Many Deprecated and E_STRICT warnings in MDB2 | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4668@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17709&edit=1
ID: 17709
Comment by: eric0043
Reported By: office at christiananger dot de
Summary: Many Deprecated and E_STRICT warnings in MDB2
Status: Open
Type: Feature/Change Request
Package: MDB2
Operating System: MacOS 10.4.11
Package Version: 2.5.0b2
PHP Version: 5.3.2
New Comment:
Have the same problem and agree, a 2.6. release requiring php5 is well
overdue. Any way I can help?
Previous Comments:
------------------------------------------------------------------------
[2010-08-24 16:14:53] prometheus
OK. It has been over one week. I cannot believe that no one is willing
to spend 15 minutes with me in a few emails helping me understand how to
fix the three lines of DEPRECATED code so I can submit a patch. Also I
do not believe that it should take too long to get rid of the STRICT
warnings as well, although, as I stated, I am not going to make any
effort to make this fix work for PHP4 users. Anyone have a few minutes?
------------------------------------------------------------------------
[2010-08-22 22:42:35] techmage
I ran into similar errors running PHP 5.213, While everything ran ok
under 5.212. Can we get an update to bring this package to current
standards?
Thanks
------------------------------------------------------------------------
[2010-08-20 23:55:56] doconnor
http://test.pear.php.net:8080/cruisecontrol/buildresults/MDB2
for some
reason doesn't show up half as many
------------------------------------------------------------------------
[2010-08-16 18:26:30] davidc
We'll be looking into this.
Also, if this is a pressing issue, patches are always welcome and you
can add them by clicking on the "Add patch" beside the "Add Comment"
tab.
Cheers
------------------------------------------------------------------------
[2010-08-16 17:43:36] prometheus
Description:
------------
I have this line in my php.ini file:
error_reporting = E_ALL|E_STRICT
I want to have this on so I can make certain that I am developing code
in compliance with best PHP standards. Yes, I know I can turn off
different levels, but my whole application is about getting data to and
from mysql database. (What a surprise for a PHP program) If I turn off
this level of reporting then I have to keep turning it on in my
programs. Probably have more lines switching reporting modes than actual
code. So, I need this to work. I am happy to undertake the patching
myself, with the understanding that I *ONLY* am making the patch for PHP
5.3. Other versions are on their own. But I do not have sufficient PHP
chops to handle it without some support from the PHP community. Looking
for volunteers to handle a few tedious and possibly ignorant email from
me over a period of about a week. Takers?
It is about time that the DEPRECATED lines are fixed in an actual
release. How long has PHP4 been expired? They should be out of luck for
getting the latest MDB2 library by now. The strict warnings I realize
are more touchy, but unless PHP 5.2 is going to absorb that concept and
adopt STRICT as well, it is time to branch and make 2.6 or whatever
require PHP 5.3.
Test script:
---------------
<?php
require_once ('MDB2.php'); // for PEAR php
$db = MDB2::connect("mysql://user:pass@localhost/test",
array('debug' => 3,'portability' =>
MDB2_PORTABILITY_NONE));
$my_result= $db->query( 'SELECT 1+1 from DUAL' );
print_r( $my_result->fetchRow() );
?>
Expected result:
----------------
Array ( [0] => 2 )
Actual result:
--------------
Deprecated: Assigning the return value of new by reference is deprecated
in /Applications/MAMP/PEAR/MDB2.php on line 393
Strict Standards: Redefining already defined constructor for class
MDB2_Driver_Common in /Applications/MAMP/PEAR/MDB2.php on line 1357
Deprecated: Assigning the return value of new by reference is deprecated
in /Applications/MAMP/PEAR/MDB2.php on line 2647
Strict Standards: Redefining already defined constructor for class
MDB2_Result_Common in /Applications/MAMP/PEAR/MDB2.php on line 3458
Strict Standards: Redefining already defined constructor for class
MDB2_Row in /Applications/MAMP/PEAR/MDB2.php on line 3929
Strict Standards: Redefining already defined constructor for class
MDB2_Statement_Common in /Applications/MAMP/PEAR/MDB2.php on line 3986
Strict Standards: Redefining already defined constructor for class
MDB2_Module_Common in /Applications/MAMP/PEAR/MDB2.php on line 4278
Strict Standards: Non-static method MDB2::connect() should not be called
statically in
/private/var/www/test.opinionwizard.com/production/htdocs/CC3.php on
line 5
Strict Standards: Non-static method MDB2::factory() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 436
Strict Standards: Non-static method MDB2::parseDSN() should not be
called statically in /Applications/MAMP/PEAR/MDB2.php on line 379
Strict Standards: Non-static method MDB2::loadClass() should not be
called statically in /Applications/MAMP/PEAR/MDB2.php on line 388
Strict Standards: Non-static method MDB2::classExists() should not be
called statically in /Applications/MAMP/PEAR/MDB2.php on line 330
Strict Standards: Declaration of
MDB2_Driver_mysql::setTransactionIsolation() should be compatible with
that of MDB2_Driver_Common::setTransactionIsolation() in
/Applications/MAMP/PEAR/MDB2/Driver/mysql.php on line 1333
Deprecated: Assigning the return value of new by reference is deprecated
in /Applications/MAMP/PEAR/MDB2/Driver/mysql.php on line 1409
Strict Standards: Non-static method PEAR::isError() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 389
Strict Standards: Non-static method MDB2::parseDSN() should not be
called statically, assuming $this from incompatible context in
/Applications/MAMP/PEAR/MDB2.php on line 2353
Strict Standards: Non-static method MDB2::setOptions() should not be
called statically in /Applications/MAMP/PEAR/MDB2.php on line 395
Strict Standards: Non-static method PEAR::isError() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 287
Strict Standards: Non-static method PEAR::isError() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 287
Strict Standards: Non-static method PEAR::isError() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 396
Strict Standards: Non-static method PEAR::isError() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 437
Strict Standards: Non-static method MDB2::areEquals() should not be
called statically, assuming $this from incompatible context in
/Applications/MAMP/PEAR/MDB2/Driver/mysql.php on line 563
Strict Standards: Non-static method PEAR::isError() should not be called
statically in /Applications/MAMP/PEAR/MDB2.php on line 442
Strict Standards: Non-static method MDB2::areEquals() should not be
called statically, assuming $this from incompatible context in
/Applications/MAMP/PEAR/MDB2/Driver/mysql.php on line 563
Strict Standards: Non-static method MDB2::classExists() should not be
called statically, assuming $this from incompatible context in
/Applications/MAMP/PEAR/MDB2.php on line 2642
Strict Standards: Non-static method MDB2::isResultCommon() should not be
called statically, assuming $this from incompatible context in
/Applications/MAMP/PEAR/MDB2.php on line 2648
Array ( [0] => 2 )
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17709&edit=1