[wp-trac] [WordPress Trac] #6666: wp_get_object_terms throws a notice in WP_DEBUG mode

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 10 18:15:18 GMT 2008


#6666: wp_get_object_terms throws a notice in WP_DEBUG mode
---------------------------+------------------------------------------------
 Reporter:  simonwheatley  |       Owner:  anonymous              
     Type:  defect         |      Status:  new                    
 Priority:  normal         |   Milestone:  2.5.1                  
Component:  General        |     Version:                         
 Severity:  normal         |    Keywords:  has-patch needs-testing
---------------------------+------------------------------------------------
 Steps to reproduce:

 1. Define the constant WP_DEBUG in wp_config.php

 2. Browse to the blog homepage of a fairly vanilla WP2.5 install

 3. Check the PHP error log, and you should see:

 Notice: Undefined index: path in /Users/simon/Projects/WordPress-2.5/site
 /wp-includes/canonical.php:174

 I suggest that $t->args is tested with isset at the beginning of the IF
 statement (see attached patch, test_for_args.patch). Someone with greater
 knowledge of that functionality might be able to suggest replacing the
 is_array test with isset...

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


More information about the wp-trac mailing list