Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#18716 closed defect (bug) (fixed)

Proper check for taxonmies in edit-tags.php

Reported by: johnbillion's profile johnbillion Owned by: ryan's profile ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Taxonomy Keywords: has-patch
Focuses: Cc:


Trying to view the term management screen for a non-existent taxonomy shows a PHP notice before the "Cheatin' uh?" message:

Trying to get property of non-object in /wp-admin/edit-tags.php on line 14

Attachments (2)

18716.2.patch (521 bytes) - added by johnbillion 12 years ago.
18716.patch (706 bytes) - added by ocean90 12 years ago.
Same as in edit.php for post type

Download all attachments as: .zip

Change History (7)

#1 @johnbillion
12 years ago

  • Keywords has-patch added

Patch which fixes the notice, but we might do well to improve the error message for non-existent taxonomies instead.

#2 @johnbillion
12 years ago

Different patch which shows a more descriptive error message. Uses the same string as the post editing screen so it's not a new string.

12 years ago

Same as in edit.php for post type

#3 @ocean90
12 years ago

  • Component changed from Administration to Taxonomy
  • Milestone changed from Awaiting Review to 3.3
  • Severity changed from minor to normal

18716.patch will do the same as in edit.php for post types, set a default one and checks if show_ui is true and prevent the notice.

#4 @ocean90
12 years ago

  • Summary changed from PHP notice on cheatin' screen to Proper check for taxonmies in edit-tags.php

#5 @ryan
12 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [18966]:

Avoid notices when viewing non-existent taxonomy. Props ocean90, johnbillion. fixes #18716

Note: See TracTickets for help on using tickets.