Ah the dreaded preg_match warning rears its ugly head yet again.
OS: Linux Ubuntu Hardy
PHP: 5.2.4-2ubuntu5.10
Drupal: 6.15
After upgrading from version 6.13 to 6.15 I began to see "warning: preg_match() expects parameter 2 to be string..." A little XDebugging around and it seems that the profile module is the culprit.
I have a field of type selection in the user profiles with several options. Whatever option is selected is being passed as an array into check_plain(), which of course fails because an array isn't very plain.
I'm attaching a patch which corrects the profile module to check the selected option in check_plain() instead of checking the selected option as an array. I would appreciate feedback if this was an appropriate fix.
Comment | File | Size | Author |
---|---|---|---|
profile-fix-checkplain-select-options.patch | 857 bytes | Anonymous (not verified) | |
Comments