Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6666 closed defect (bug) (duplicate)

wp_get_object_terms throws a notice in WP_DEBUG mode

Reported by: simonwheatley's profile simonwheatley Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: General Keywords:
Focuses: Cc:


Steps to reproduce:

  1. Define the constant WP_DEBUG in wp_config.php
  1. Browse to the blog homepage of a fairly vanilla WP2.5 install
  1. 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...

Attachments (1)

test_for_args.patch (601 bytes) - added by simonwheatley 16 years ago.
Patched taxonomy.php to test for $t-args in an IF statement

Download all attachments as: .zip

Change History (6)

16 years ago

Patched taxonomy.php to test for $t-args in an IF statement

#1 @simonwheatley
16 years ago

  • Cc simon@… added

#2 @westi
16 years ago

  • Milestone changed from 2.5.1 to 2.6
  • Owner changed from anonymous to westi
  • Status changed from new to assigned
  • Version set to 2.5

2.6 is a more appropriate target for these fixes.

#3 @kaspars404
16 years ago

Note: Title and patch is duplicate of ticket:6960. Look only at the description for this "E_NOTICE" bug.

#4 @jacobsantos
16 years ago

  • Milestone 2.9 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

This most likely was fixed with another notices patch. I think there should only be one ticket for notices and warnings fixes per WordPress version.

#5 @jacobsantos
16 years ago

  • Keywords has-patch needs-testing removed
Note: See TracTickets for help on using tickets.