[wp-trac] [WordPress Trac] #37368: get_object_taxonomies() ignores output type argument for attachments

WordPress Trac noreply at wordpress.org
Tue Aug 30 03:06:08 UTC 2016


#37368: get_object_taxonomies() ignores output type argument for attachments
--------------------------------------+---------------------
 Reporter:  Rarst                     |       Owner:
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.7
Component:  Taxonomy                  |     Version:  3.0
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+---------------------

Comment (by boonebgorges):

 In [changeset:"38437"]:
 {{{
 #!CommitTicketReference repository="" revision="38437"
 Remove unnecessary uniqueness check in `get_attachment_taxonomies()`.

 Running the taxonomy array through `array_unique()` is unnecessary
 when the function returns objects, because the associative keys already
 ensure uniqueness.

 This also fixes a bug when running `get_attachment_taxonomies()` in
 HHVM, which doesn't like casting objects to strings for the purposes
 of `array_unique()`.

 Props swissspidy.
 See #37368.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37368#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list