[wp-trac] [WordPress Trac] #3626: load_template() notice

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 21 01:59:00 GMT 2007


#3626: load_template() notice
---------------------+------------------------------------------------------
 Reporter:  idle     |       Owner:  anonymous                   
     Type:  defect   |      Status:  new                         
 Priority:  low      |   Milestone:  2.0.8                       
Component:  General  |     Version:  2.0.7                       
 Severity:  trivial  |    Keywords:  load_template,notice,extract
---------------------+------------------------------------------------------
 In function load_template() a PHP notice is generated because of an empty
 array under some circumstances (unknown to me at this point). The line is:
 {{{
         extract($wp_query->query_vars, EXTR_SKIP);
 }}}

 Fix: Make sure that the passed variable is an array.
 {{{
         if ( is_array($wp_query->query_vars) ) {
                 extract($wp_query->query_vars, EXTR_SKIP);
         }
 }}}

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


More information about the wp-trac mailing list