There's a trivial bug in 'form.inc'. I'm attaching a patch.
When reporting some error via watchdog(), an error message is composed, but a varible used in it, $v, is undefined. It should be $elements['#value'] instead (by examining a few lines preceding that erroneous line you can easily see how that "$v" got here: the programmer just copied verbatim a previous line).
I found this bug while trying to help a user who complained about this error message being printed. Since a wrong variable is sent to watchdog(), this error message doesn't contain enough information, and we can't help the user... :-(
Comments
Comment #1
dries commentedI think this fixed a bug indeed. :)
However, this doesn't look quite right:
Shouldn't that be the following:
Comment #2
amnon commentedYes, you're right. It should be theme('placeholder'...)
There are two occurrences of "theme_placeholder" in this file -- for no reason, it seems, because they are followed by theme('placeholder',...) on the same line...
Comment #3
dries commentedAlright, moving this to 'code needs work' status.
Comment #4
rblomme@drupal.org commentedthe patch file for cvs DRUPAL-4.7 branch in attachment
Comment #5
edmund.kwok commentedRerolled patch for 4.7.4. Also changed another theme_placeholder to use theme('placeholder') instead.
Comment #6
killes@www.drop.org commentedapplied to 4.7, please check for D5.
Comment #7
dries commentedThis is fixed in D5. Thanks all!
Comment #8
(not verified) commented