The last submitted patch, 6: entity-array-flip-boolean-2132931-6.patch, failed testing. View results β
Hi there,
I have a rule which checks to see if the value of a checkbox (that is, a Boolean field) has changed from false to true. As an action, the rule emails out both the old value and the new. Immediately after saving the content when this rule is active, I get the following warning, repeated twice:
Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityListWrapper->label() (line 1086 of ... contrib/entity/includes/entity.wrapper.inc).
When this happens, the value of parent::value() is:
array(
0 => true,
);
This only happens when you try to include either the old ([node-unchanged:field-xxxxx]) or new ([node:field-xxxxx]) values in an action (send an email, display a message, etc.)
I tried this on other field types and, so far, it only happens on Booleans.
The attached patch fixes the problem, but might not be the best approach - I'm not sure what side effects it might have.
Note that this is not the same as #1102570: array_flip() [function.array-flip] issue in DrupalDefaultEntityController / entity.inc β , though it may be related.
Needs review
1.0
Code - misc
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
The last submitted patch, 6: entity-array-flip-boolean-2132931-6.patch, failed testing. View results β