Line 86 checks to make sure we are dealing with a term reference. I think the XOR is not quite right here. XOR evaluates to true if either of its operands are true, but returns false if both of its operands are true.
We only want the execution of this function to continue if we have a taxonomy_term_reference field. Let's say that $form['#field']['type'] is not set. The first operand evaluates to true. Since xor can not be short circuited like or can (because we need to make sure the other operand is NOT true) we go on and check if $form['#field']['type'] != 'taxonomy_term_reference' this evaluates to true (obviously) and we keep chugging along when $form['#field']['type'] isn't even set!
I am including a patch that alters the logic to make sure that we only continue if:
- $form['#field']['type'] is set
- $form['#field']['type'] is 'taxonomy_term_reference'
FYI: this is my first patch submission, so please let me know if I am doing anything incorrectly and I will fix.
Thanks,
Pat
Comment | File | Size | Author |
---|---|---|---|
abt.logicXORfix.patch | 522 bytes | pmcdougl | |
Comments
Comment #1
Simon Georges CreditAttribution: Simon Georges commentedChanging status, as there is a patch.
Comment #5
adooo CreditAttribution: adooo as a volunteer commentedMy bad about the failed test... patch is already applied :)
Soon to be in a proper relase...
Sorry for keeping you waiting