Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: http://api.drupal.org/comment/reply/19114
Return value is a string, not an array.
Comment | File | Size | Author |
---|---|---|---|
#8 | d8_node.api-updated_doc-1472614.patch | 798 bytes | filijonka |
#5 | d8_node.api-updated_doc-1472614.patch | 798 bytes | filijonka |
#3 | node-apidoc_update-1272614.patch | 746 bytes | filijonka |
Comments
Comment #1
filijonka CreditAttribution: filijonka commentedcould you please give us the function page to which this report belongs to?
Comment #2
pfournier CreditAttribution: pfournier commentedYes, sorry I did not check the link URL.
http://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook...
Comment #3
filijonka CreditAttribution: filijonka commentedchanged
Comment #4
jhodgdonGood catch! Both the example in the hook docs and the two implementations of hook_node_update_index() do indeed return strings and not arrays.
I think we can make the wording better though... "String of additional information to be indexed." is ... awkward? Can you think of a better way to say that?
And the initial patch needs to be made for 8.x.
Comment #5
filijonka CreditAttribution: filijonka commentedbetter perhaps?
Comment #6
filijonka CreditAttribution: filijonka commentedComment #7
jhodgdonMuch better!
The only thing to fix is that the return value type should be lower-case "string", not upper-case "String". See
http://drupal.org/node/1354#param-return-data-type
Comment #8
filijonka CreditAttribution: filijonka commentedwhen things are to easy we rush through them..sorry for wasting the time on trivia stuff
Comment #9
jhodgdonThat looks fine, thanks! I'll get it committed shortly.
Comment #10
jhodgdonCommitted to 8.x and 7.x.