[wp-trac] [WordPress Trac] #12709: PHP 5.3 : Assigning the return value of new by reference is deprecated

WordPress Trac wp-trac at lists.automattic.com
Sun Nov 27 17:10:57 UTC 2011


#12709: PHP 5.3 : Assigning the return value of new by reference is deprecated
--------------------------+-----------------------
 Reporter:  devil1591     |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------
Changes (by j_schumann):

 * status:  closed => reopened
 * resolution:  wontfix =>


Comment:

 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+

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12709#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list