Drupal version 5.3
I was getting a php warning, bad type in an empty / isset on line #158, when a user hadn't selected an option in a select dropdown.
The error was being thrown because in the foreach($keys as $key) {, $key was an array. So I changed this line and check first if $key is actually scalar:
if (is_scalar($key) && (isset($options[$key]))) {
and so far this seems to work without errors.
Comments
Comment #1
KiberGus-1 commentedI have the same problem. Replacing $keys = array($items['key']); with $keys = (array)$items['key']; on line 153 seems to fix things too. As I understand, optionwidgets_widget is triggered twice, once with keys as arrays and onother with keys as strings. I'll use your patch, because I don't want to test mine.
Comment #2
karens commentedThe D5 version is no longer being supported. Sorry.