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

jhodgdon’s picture

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).

markpavlitski’s picture

Status: Active » Needs review
FileSize
1.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.

jhodgdon’s picture

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.

jhodgdon’s picture

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.

markpavlitski’s picture

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

D7 patch attached.

jhodgdon’s picture

Status: Needs review » Fixed

Thanks! Committed to 7.x.

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