I made a rules set to enable/disable posting of comments on a specific node, and am trying to use the intelligent save feature of the custom php action

if($enabled)
  $status = COMMENT_NODE_READ_WRITE;
else
  $status = COMMENT_NODE_DISABLED;
$node->comment = $status;
return array("node" => $node);

When it executes, I get this error:
Fatal error: Unsupported operand types in /home/third/public_html/phred/sites/all/modules/rules/rules/rules.variables.inc on line 164

I do not get the error if I remove the last line, and replace it with a "Save content" action.

Comments

asund’s picture

Component: Rules Core » Rules Engine

+1 here. Exact same issue. Works fine with the "Save content" action, so i guess it's not critical.

fago’s picture

Status: Active » Fixed

thanks, fixed.

Status: Fixed » Closed (fixed)

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