Opened 15 years ago
Closed 13 years ago
#12709 closed defect (bug) (duplicate)
PHP 5.3 : Assigning the return value of new by reference is deprecated
Reported by: | devil1591 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Warnings/Notices | Keywords: | |
Focuses: | Cc: |
Description
when upgrading PHP to PHP 5.3, you have errors of this type.
set_magic_quotes_runtime( 0 ); is also deprecated
Attachments (4)
Change History (12)
#3
@
15 years ago
These errors happen because some plugins call directly wp-config.php instead of calling wp-load.php
#4
@
13 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened
Since WP 3.2 PHP4 support is retired and PHP5.2+ required so it would be a good time now with 3.3 coming to fix those errors.
Changing the error_reporting value or deactivating Plugins are only cosmetic solutions, the code still is deprecated.
There are some core files throwing E_DEPRECATED, mostly from "Assigning the return value of new by reference", other occurences of deprecated code like the aforementioned set_magic_quotes_runtime() have already been fixed in trunk.
Some of the files holding deprecated code include:
/wp-includes/widgets.php:324
/wp-includes/class-wp.php:570
/wp-includes/taxonomy.php:1161
/wp-includes/theme.php:1721
/wp-includes/l10n.php:486
/wp-includes/query.php:92
/wp-includes/class-phpmailer.php - some occurences
/wp-includes/class-simplepie.php - many occurences
Most of these can be fixed by simply removing the ampersand in front of the new operator or function definiton which does not change the functionality for PHP5+
@
13 years ago
replace set_magic_quotes_runtime in class-pclzip.php, remove check for deprecated functions
#6
@
13 years ago
- Cc j_schumann added
- Keywords needs-patch removed
All other occurences of "set_magic_quotes_runtime", "&new" and "& new" seem to be fixed in trunk already.
E_DEPRECATED errors are suppressed in WordPress, so you should never see these.
We need to keep the code that is deprecated in 5.3 to be compatible with PHP 4.