Issues with passing-by-reference the $form_state parameter to form_alter methods.
The following are warnings displayed on my user/:id/edit page and admin/settings/onepageprofile page:
warning: Parameter 2 to nodecomment_form_alter() expected to be a reference, value given in /Applications/MAMP/htdocs/singlebrook/virtual_workshop/includes/common.inc on line 2892.
warning: Parameter 2 to i18nmenu_form_alter() expected to be a reference, value given in /Applications/MAMP/htdocs/singlebrook/virtual_workshop/includes/common.inc on line 2892.
warning: Parameter 2 to rules_forms_form_alter() expected to be a reference, value given in /Applications/MAMP/htdocs/singlebrook/virtual_workshop/includes/common.inc on line 2892.
Naturally, these will be slightly different depending on the form_alter implementations on different modules.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | php5.3incompatibilities-1123782-corrected.patch | 782 bytes | Anonymous (not verified) |
| #1 | php5.3incompatibilities-1123782.patch | 977 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedComment #2
Anonymous (not verified) commentedSmall bug in last one with variable names. This patch is correct. Uses http://drupal.org/node/705512 as starting point for fix.
Comment #3
etomilin commentedPatch #2 worked fine for me.
Comment #4
roball commentedPatch from #2 perfectly fixes all those problems.
I was hit by the PHP errors
and
when viewing my user's profile page (user/[UID]), when the modules "WebFM" and "Wysiwyg" are enabled.
Please commit the patch, thanks!
Comment #5
roball commentedComment #6
aidanlis commentedI think this was fixed in #901444: PHP notice by not passing $form['#id'], apologies for leaving the queue so unmaintained that this became a problem.
Comment #7
aidanlis commentedComment #9
Anonymous (not verified) commentedPatch in #2 didn't work for me in Drupal 6.25 - but the other one did - http://drupal.org/node/901444#comment-3557256
Comment #10
roball commentedThis bug has already been fixed in the current version (6.x-1.13). No need to patch!!