The line:

$node = node_load(array('nid' => $gid));

appears at the top of og_invite and also further down in the same function:

      if (!$err) {
        $node = node_load(array('nid' => $gid));

This patch removes the second call, since the node has already been loaded at this point.

This is not an issue in 4.7/CVS because the og_invite function is broken into 3+ other functions where reloading the node is required.

CommentFileSizeAuthor
og.module_1.patch792 byteswebchick

Comments

moshe weitzman’s picture

please commit to all branches. note that node_load() syntax changed in 4.7

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 4.6 branch. HEAD/4.7 don't need this since the two node loads are in separate functions:

1. in og_invite:

$node = node_load($gid);

2. in og_invite_form_submit:

$node = node_load($form_values['gid']);

Confirmed that both are using the new 4.7 syntax which removes the requirement for node_load arguments to be wrapped in an array if you're passing in a node ID.

Anonymous’s picture

Status: Fixed » Closed (fixed)