More a confusion than really a bug:

 // Pass in the $nid (which could be a $cid, depending on $node->type)
      $function($nid, $type);

When it is a comment, the comment ID is passed. But when it is a node, the node object is passed. Some better clarification might be needed ($nid is not normally used for node object).

Comments

Ian Ward’s picture

Status: Active » Closed (duplicate)

This is related to http://drupal.org/node/855312 ... I'll mark this as a dupe (this is an older issue but it will go along for the ride on #855312: Pass full node to implementations of hook_mailhandler_post_save. Thanks for the report.