[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
Fri Jan 23 21:11:36 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.1    
Component:  General                  |      Version:  2.7      
 Severity:  blocker                  |   Resolution:           
 Keywords:  has-patch tested commit  |  
-------------------------------------+--------------------------------------
Comment (by jacobsantos):

 {{{
 #!php
 <?php

 // int(6143)
 var_dump(E_ALL);

 // int(2048)
 var_dump(E_STRICT);

 // int(-8182)
 var_dump(((E_ALL ^ ~E_STRICT ^ E_WARNING ^ E_NOTICE) ));

 // int(0)
 var_dump( ( E_ALL & E_STRICT & E_WARNING & E_NOTICE ) );

 // int(0)
 var_dump( ( (E_ALL ^ E_NOTICE ^ E_USER_NOTICE) & E_STRICT) );

 // int(7159)
 var_dump( ( (E_ALL ^ E_NOTICE ^ E_USER_NOTICE) ^ E_STRICT) );

 // int(7159)
 var_dump( ( (E_ALL ^ E_NOTICE ^ E_USER_NOTICE) | E_STRICT) );

 // int(5111)
 var_dump( ( (E_ALL ^ E_NOTICE ^ E_USER_NOTICE) & ~E_STRICT) );

 // int(5111)
 var_dump( (E_ALL ^ E_NOTICE ^ E_USER_NOTICE) );

 ?>
 }}}

 It appears the reason my patch worked was because it evaluated to '0',
 which would have disabled the error reporting.

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


More information about the wp-trac mailing list