[wp-trac] Re: [WordPress Trac] #10264: wp-includes E_STRICT errors

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 26 21:41:18 GMT 2009


#10264: wp-includes E_STRICT errors
-------------------------------+--------------------------------------------
 Reporter:  Mittineague        |        Type:  defect (bug)    
   Status:  new                |    Priority:  low             
Milestone:  2.9                |   Component:  Warnings/Notices
  Version:  2.8                |    Severity:  normal          
 Keywords:  reporter-feedback  |  
-------------------------------+--------------------------------------------

Comment(by Mittineague):

 Thanks for the quick response.

 Yes I am "messing" with error reporting. In particular, my Error Reporting
 plugin which allows for highly customizable (by type/folder) treatment of
 errors (logging and/or email notification).

 I understand the uniqueness of is_a() in that it is needed < PHP 5.0,
 works in subsequent versions (deprecated, but still works), and is back
 again in 5.3

 My main concerns are in particular it's use in the classes.php is_wp_error
 function, which is called hundreds of times per page load. My testing
 shows that is_a is 3 times slower than instanceof (amounts to maybe 1/10
 sec. per page load) so it's more a performance thing than an error thing,
 although in can bloat logs if "ignore_repeated" is false.

 I am also wondering about the functions.wp-style.php file's wp_style_is
 function. i.e.
 {{{
 function wp_style_is( $handle, $list = 'queue' ) {
         global $wp_styles;
         if ( !is_a($wp_styles, 'WP_Scripts') )
                 $wp_styles = new WP_Styles();

         $query = $wp_styles->query( $handle, $list );

         if ( is_object( $query ) )
                 return true;

         return $query;
 }
 }}}
 I may be missing something, but should WP_Scripts be WP_Styles instead?

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


More information about the wp-trac mailing list