Closed (fixed)
Project:
CAPTCHA
Version:
5.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 May 2007 at 20:16 UTC
Updated:
17 Aug 2007 at 21:19 UTC
sometimes I get the following error related to forms with captcha field:
" Fatal error: Unsupported operand types in ...../modules/contrib/captcha/captcha.module on line 197"
line 197 is: "$form['#validate'] += array('captcha_validate' => array());"
I guess the '+=' does not work if '$form['#validate']' is not set.
Changing that line to the following helps:
"""
if(isset($form['#validate'])) {
$form['#validate'] += array('captcha_validate' => array());
} else {
$form['#validate'] = array('captcha_validate' => array());
}
"""
Comments
Comment #1
mgiffordThat helped to deal with the error (that I was getting too), but the form doesn't appear to allow people to subscribe to our newsletter. It seems to just void the other form elements in the simplenews module. I'm using the latest version the captcha module & the dev version of simplenews.
Would really like to have this cleaned up (or know that there is a way to revert to the last release).
Mike
Comment #2
GoofyX commentedThis is a duplicate of http://drupal.org/node/139805. Please close it.
Thank you.
Comment #3
wundo commented