declare #validate and #submit for consistency
skizzo - October 17, 2009 - 12:38
| Project: | Secure Site |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I am getting the following error on the login page when Securesite is enabled.
Apart from that I don't notice any adverse effect.
warning: array_unshift() [function.array-unshift]: The first argument should be an array in /var/www/drupal/sites/all/modules/logintoboggan/logintoboggan.module on line 191.

#1
meh, i knew i should have coded more defensively there...
i put in some paranoid checks in LoginToboggan to avoid this issue in the future.
incidentally, that error does break LT's validation handler, which would be a problem if you have 'Login with e-mail' set.
the problem is securesite's implementation of the login form,
securesite_user_login(&$form_state). it doesn't declare any #submit or #validate handlers at all in the form.i would recommend that function be patched to at least include empty arrays for #validate and #submit -- most other modules are probably expecting those to be arrays.
attached patch for the 6.x-2.x branch does this.
#2
#3
Patched. Should this issue be moved to the Secure site queue?
#4
@skizzo: it's already in the Secure Site queue -- read the metadata table at the top of the issue...