When I save nodes under workflow, I get the following error:
* warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in [removed]\sites\all\modules\workflow\workflow.module on line 275.
* warning: Illegal offset type in [removed]\sites\all\modules\workflow\workflow.module on line 1576.
Line 275 is starred:
function workflow_transition($node, $sid) {
// Make sure new state is a valid choice.
* if (array_key_exists($sid, workflow_field_choices($node))) {
Line 1576:
$values['workflow-current-state-name'] = $states[$sid];
These errors are showing up when I edit a node even if I don't move it to another state. I am the administrator on this site and I'm allowed to view and edit nodes in any state and to make all the available transitions, so it's not an access issue. Any ideas?
Running on Drupal 6.17, PHP 3.1.3.1, MySQL 5.0.51a, Windows.
Comments
Comment #1
beckyjohnson commentedI am also getting this error. Not really sure what is triggering it. Happy to help out if someone gives me a clue what to look for.
Becky
Comment #2
bnice5000 commentedI am getting the same issue. However, If I uncheck all of the workflow permission fields from the workflow fields module the issue goes away. Could this possibly be related to the workflow fields module?
Comment #3
heatherann commentedbnice5000, can you explain what you mean by "If I uncheck all of the workflow permission fields from the workflow fields module"? Where are you doing this? Are you removing edit/view permissions from the various Workflow states for those fields? Or something else entirely?
Comment #4
nunoveloso commentedIt's happening for me on 1.5 too (line 276).
Unsure what's proposed on #2 though.
Any thoughts?
Comment #5
nunoveloso commented(fixing title)
Comment #6
johnvThis is also reported in D7: #2048327: array_key_exists() expects parameter 2 to be array, boolean given
And it is corrected in D7 here: #2037531-2: workflow_field_choices() has inconsistent result
If needed, request a backport over there.