Based on certain events in the system, when i change the workflow state of a node using rules, i get this warning. The transition of the state happens properly but it keeps displaying this warning.

# warning: in_array(): Wrong datatype for second argument in /sites/all/modules/workflow/workflow.rules.inc on line 62.
# warning: in_array(): Wrong datatype for second argument in /sites/all/modules/workflow/workflow.rules.inc on line 68.
# warning: in_array(): Wrong datatype for second argument in /sites/all/modules/workflow/workflow.rules.inc on line 71.

My Environment : Drupal 6.16
Workflow Version : 6.x-1.4
Rules Version : 6.x-1.2
PHP Version : 5.2.12

Comments

simon georges’s picture

Status: Active » Needs review

Hi,

Looking at the code, I think it's expecting old_state or new_state instead of from_state and to_state.
Please find attached a patch providing this modification. I haven't tested it, so feel free to come back with your feedback.

Regards,

simon georges’s picture

[Edit] Dummy comment due to timeout on submission...

simon georges’s picture

Oups... I forgot to attach the patch.

simon georges’s picture

[Edit] Dummy comment due to timeout on submission...

Bastlynn’s picture

Status: Needs review » Closed (won't fix)

Since this request is over a year old, I'm going to assume a solution was found or you've moved on. If not, please get updated to the latest versions of all modules and make a patch for it against Drupal 7 and I'll be glad to take a look at it.