I'm getting this error message:
Warning: Invalid argument supplied for foreach() in theme_pollfield_formatter_default() (line 203 of /drupal-site/sites/all/modules/pollfield/pollfield.module).
The problem is that Pollfield populates an undeclared array variable, only when translations are active. Later in the code, at line 203, it uses that variable in a foreach iteration. Because I'm not using content translation, that variable isn't set and PHP starts whining.
Since we might as well declare the variable before using it, also to avoid PHP notices, I went ahead and rolled a patch for it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | pollfield-undefined-variable-2.patch | 680 bytes | tobiassjosten |
| pollfield-undefined-variable.patch | 780 bytes | tobiassjosten |
Comments
Comment #1
tobiassjosten commentedActually, this needs to go in before that if statement I placed it in. Here's the correct and working patch.
Comment #2
NeoID commentedNow giving me:
Illegal offset type i /.../taxonomy.module på linje 607.
Illegal offset type in isset or empty i /.../taxonomy.module på linje 1039.
Comment #3
tobiassjosten commentedAre you sure this is because of my patch? I can't see the connection.
Comment #4
bryan kennedy commentedNoticed here as well. http://drupal.org/node/904424
Now fixed in the latest dev.
http://drupal.org/node/904424
Thanks for your patches. Credit given in the commit.