API page: http://api.drupal.org/api/drupal/includes%21module.inc/function/module_i...

The gist of this comment http://api.drupal.org/comment/35778#comment-35778 should be added to the docs for both functions.

Files: 
CommentFileSizeAuthor
#5 drupal-module-invoke-args-d7-1936166-2.patch1.3 KBmarkpavlitski
PASSED: [[SimpleTest]]: [MySQL] 40,346 pass(es).
[ View ]
#2 drupal-module-invoke-args-d8-1936166-2.patch1.1 KBmarkpavlitski
PASSED: [[SimpleTest]]: [MySQL] 55,688 pass(es).
[ View ]

Comments

Sounds like a good thing to document that arguments are not passed by reference. Should probably also mention that if you need to pass things by reference, you can use drupal_alter() (or alter hooks in general).

Status:Active» Needs review
StatusFileSize
new1.1 KB
PASSED: [[SimpleTest]]: [MySQL] 55,688 pass(es).
[ View ]

This patch documents that arguments are passed by value and refers to drupal_alter() as an alternative.

Assigned:Unassigned» jhodgdon
Status:Needs review» Reviewed & tested by the community

Thanks! I'll get this committed shortly unless one of the other maintainers gets to it first.

Version:8.x-dev» 7.x-dev
Assigned:jhodgdon» Unassigned
Status:Reviewed & tested by the community» Patch (to be ported)

Thanks! Committed to 8.x. Needs porting to 7.x.

Status:Patch (to be ported)» Needs review
StatusFileSize
new1.3 KB
PASSED: [[SimpleTest]]: [MySQL] 40,346 pass(es).
[ View ]

D7 patch attached.

Status:Needs review» Fixed

Thanks! Committed to 7.x.

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