Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5417 closed defect (bug) (fixed)

get_object_taxonomies returns all taxonomies on object_type 0

Reported by: nbachiyski's profile nbachiyski Owned by: westi's profile westi
Milestone: 2.5 Priority: lowest
Severity: minor Version: 2.3.1
Component: General Keywords: has-patch
Focuses: Cc:

Description

Expected:
Calling get_object_taxonomies(0)}} returns an array of taxonomies with object_type equal to {{{0.

Actual:
Calling {{{get_object_taxonomies(0)}} returns an array of all taxonomies.

Since for php 0 == 'baba' we have to use strict equal to catch errors like these. Patch attached.

Attachments (1)

corerct-object-type.diff (420 bytes) - added by nbachiyski 17 years ago.

Download all attachments as: .zip

Change History (4)

#1 @nbachiyski
17 years ago

Oh, and I forgot to mention: actually Alex Shiels found that through a unit test.

#2 @westi
17 years ago

  • Keywords has-patch added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

#3 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6355]) Don't return all taxonomies for an object type of 0. Props tellyworth and nbachiyski. fixes #5417

Note: See TracTickets for help on using tickets.