API page: http://api.drupal.org/api/drupal/modules--taxonomy--taxonomy.module/func...

Describe the problem you have found:

The return value can also be an empty array, when no parents are found. This is not described in the Return value. Users with smart IDEs will benefit from these kind of correct informations.

CommentFileSizeAuthor
#2 taxonomy-parents-1196112-2.patch603 bytesdrupal_was_my_past
PASSED: [[SimpleTest]]: [MySQL] 33,994 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

jhodgdon’s picture

Title: Documentation problem with taxonomy_get_parents » taxonomy_get_parents return value doc isn't complete
Version: 7.2 » 8.x-dev
Issue tags: +needs backport to D7

Thanks for reporting! We fix in 8.x then port back to 7.x

drupal_was_my_past’s picture

Assigned: Unassigned » drupal_was_my_past
Status: Active » Needs review
FileSize
603 bytes
PASSED: [[SimpleTest]]: [MySQL] 33,994 pass(es). View

Patch attached that adds documentions that specifies that taxonomy_get_parents() returns an empty array if no parents are found.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks.

Automatically closed -- issue fixed for 2 weeks with no activity.