Warning: preg_match() expects parameter 2 to be string, array given in /***/modules/logintoboggan/logintoboggan.module on line 732

I am looking into this later in the dev. process, but I'd like to report this, in case others have seen and solved this.

CommentFileSizeAuthor
#8 101660_pass_send_as_array.patch731 bytesBèr Kessels

Comments

hunmonk’s picture

this means the password from $form_values is being passed as an array? weird. i cannot reproduce during registration or user edits. what are the steps to reproduce?

Gary Feldman’s picture

Status: Active » Postponed (maintainer needs more info)
MattKelly’s picture

I'm experiencing the same problem and I'm working on a fix.

MattKelly’s picture

Logintoboggan only expects one password in function logintoboggan_validate_pass($pass). Drupal passes two.

For my sake, I've done a quick fix by just putting this at the top of that function:
$pass = $pass['pass1'];

I'm positive this isn't the best solution, but it seems to be working for the time being.

MattKelly’s picture

That last fix breaks registration. So, I've changed it to this:

if (arg(2) == 'edit') {
$pass = $pass['pass1'];
}

Bèr Kessels’s picture

Status: Postponed (maintainer needs more info) » Active

Reproduce:
install $Id: logintoboggan.module,v 1.7.2.60 2006/12/17 19:11:26 thehunmonkgroup Exp
on latest Drupal 4.7

Then visit any user/X/edit form and 'submit'.

Bèr

Bèr Kessels’s picture

Title: Warning caused by logintoboggan » logintoboggan sends $pass as array to the pw validation function.

Changed the title to reflect the problem.

Bèr Kessels’s picture

StatusFileSize
new731 bytes

Here is a patch that should ix this problem. Somehow on validate the $form_values#pass contained an array. We now only validates the first of the two (they are similar anyway).

Bèr Kessels’s picture

Status: Active » Needs review
hunmonk’s picture

Status: Needs review » Postponed (maintainer needs more info)

i am unable to reproduce this problem -- can you please re-test w/ the latest version of the module, and mark this issue as closed if you can't reproduce? thanks

hunmonk’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

i'm guessing this is no longer a problem.