[wp-trac] [WordPress Trac] #8701: WordPress throws E_DEPRECATED notices all over the place with newer PHP 5 installs

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 22 21:27:34 GMT 2008


#8701: WordPress throws E_DEPRECATED notices all over the place with newer PHP 5
installs
--------------------------+-------------------------------------------------
 Reporter:  Otto42        |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.8      
Component:  General       |     Version:  2.7      
 Severity:  normal        |    Keywords:           
--------------------------+-------------------------------------------------
 On PHP 5.3 and up installs, there's lots of deprecated messages popping up
 everywhere.

 As reported here:
 http://wordpress.org/support/topic/227914

 PHP Deprecated: Assigning the return value of new by reference is
 deprecated in C:\Inetpub\wwwroot\wordpress\wp-settings.php on line 512
 PHP Deprecated: Assigning the return value of new by reference is
 deprecated in C:\Inetpub\wwwroot\wordpress\wp-settings.php on line 527
 ...
 PHP Deprecated: Assigning the return value of new by reference is
 deprecated in C:\Inetpub\wwwroot\wordpress\wp-includes\cache.php on line
 103
 PHP Deprecated: Assigning the return value of new by reference is
 deprecated in C:\Inetpub\wwwroot\wordpress\wp-includes\query.php on line
 61
 PHP Deprecated: Assigning the return value of new by reference is
 deprecated in C:\Inetpub\wwwroot\wordpress\wp-includes\theme.php on line
 1109

 And so on.

 There's no real good fix for this, since WP is still trying to maintain
 backward compatibility all the way to PHP 4, however since wp-settings is
 already setting the error_reporting() level, it might be a good idea to
 stick some extra code in there to make it ignore E_DEPRECATED for the
 cases where E_DEPRECATED is defined. That might prevent these spurious
 errors in at least some cases.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8701>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list