Download & Extend

field_info_field() does not document return value on failure

Project:Drupal core
Version:8.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:mjonesdinero
Status:closed (fixed)
Issue tags:needs backport to D7, Novice

Issue Summary

API page: http://api.drupal.org/api/drupal/core%21modules%21field%21field.info.inc...

Enter a descriptive title (above) relating to field_info_field, then describe the problem you have found:

I can *see* that on failure I will get a NULL, but the PHPDoc is missing it.

Comments

#1

Not sure if the *.patch files have a standard format. I created this one with hg and phpstorm.

AttachmentSizeStatusTest resultOperations
added_Return_message.patch683 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Invalid patch format in added_Return_message.patch.View details

#2

Title:Return on failure missing» field_info_field() does not document return value on failure
Status:active» needs work

Thanks for the patch! It isn't quite the right format -- you need to use Git to make a patch, and when uploading, set the issue status to "needs review" to trigger both human and test-bot reviewers that you have made a patch.

See http://drupal.org/node/707484 , or http://drupal.org/novice if you need more extensive help in getting started as a Drupal Core contributor.

Meanwhile, perhaps someone can re-roll this patch? Please also put "the" in "NULL if *the* field was not found." :)

#3

Assigned to:Anonymous» mjonesdinero
Status:needs work» needs review

attach is the re-rolled patch

AttachmentSizeStatusTest resultOperations
field_info_field-does-not-1689394-3.patch584 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 37,297 pass(es).View details

#4

Status:needs review» fixed

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

#5

Status:fixed» closed (fixed)

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