Using version: 7.x-2.0-beta2 of State Flow and creating a view with a "State Flow: Event links" field produces the following error and does not provide the appropriate event links.
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in StateFlow->get_event() (line 115 of contrib/state_machine/modules/state_flow/plugins/state_flow.inc).
I'm not sure what this function is expecting but the $key it is receiving is the event name(to draft, publish, etc.) not an integer.
public function get_event($key) {
dsm($key, '$key');
if (!array_key_exists($key, $this->events)) {
return FALSE;
}
if (is_array($this->events[$key])) {
$options = $this->events[$key];
$this->events[$key] = new StateFlow_Event($key, $this, $options);
}
return $this->events[$key];
}
Comments
Comment #1
genjohnson commentedI am getting the same error with version 7.x-2.0-beta3.
Comment #2
fmitchell commentedThanks. Fixed in http://drupalcode.org/project/state_machine.git/commit/86b58db
Comment #4
genjohnson commentedI finally found a moment to apply the patch, and it works great. Thank you!