[wp-trac] Re: [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
Wed Apr 15 19:19:44 GMT 2009


#8701: WordPress throws E_DEPRECATED notices all over the place with newer PHP 5
installs
-------------------------------------+--------------------------------------
 Reporter:  Otto42                   |        Owner:  anonymous
     Type:  defect (bug)             |       Status:  reopened 
 Priority:  high                     |    Milestone:  2.7.2    
Component:  General                  |      Version:  2.7      
 Severity:  blocker                  |   Resolution:           
 Keywords:  has-patch tested commit  |  
-------------------------------------+--------------------------------------

Comment(by azaozz):

 When setting error_reporting shouldn't we be turning bits off instead of
 flipping them? Something like this
 {{{
 if ( defined( 'E_DEPRECATED' ) ) // Introduced in PHP 5.3, missing in
 early 6.x
     error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_USER_NOTICE &
 ~E_STRICT );
 else
     error_reporting( E_ALL & ~E_NOTICE & ~E_USER_NOTICE & ~E_STRICT );

 }}}
 would work for all versions of php including 6.x.

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


More information about the wp-trac mailing list