Hello,

with the latest stable version I get this error when the login fails:

Notice: Array to string conversion in login_security_validate() (line 239 of /.../sites/all/modules/login_security/login_security.module).

Any Idea how to fix it?

Best regards
Frank

Comments

deekayen’s picture

Uhm, I'm confused. This should be that line:

$failure_message = preg_grep("/<a href=\"\/user\/password\">/", $error_messages);

http://php.net/preg_grep says the second argument should be an array. Your notice suggests that it's expecting a string.

fraweg’s picture

StatusFileSize
new24.61 KB

Hello,

thanks for your answer. Are there changes in that since the last version? Any idea what to change?

Best regards
Frank

Edit: I attached a screenshot

bdone’s picture

Component: Miscellaneous » Code

seems to only occur when there's an actual error. tested by forcing one with:

  drupal_set_message(t('forced login_security error'), 'error');
bdone’s picture

Status: Active » Needs review
StatusFileSize
new856 bytes

patch attached.

fraweg’s picture

Status: Needs review » Active

Hello,

thanks for your great support in this issue!

Where should I put these code?

Best regards
Frank

bdone’s picture

Status: Active » Needs review

@fraweg: the patch in #4 is awaiting community review.

if you want to help with a review, you can review the patch. otherwise you'll have to wait until it is. if approved, it will eventually make its way back into the next release of login_security.

deekayen’s picture

Status: Needs review » Fixed

Rolled #4 into 7.x-1.1.

fraweg’s picture

Thanks a lot! This patch works for me.

Best regards

Edit: I havn't seen #4 befor I write #5 :-( . So I write #5 against #3. Sorry about that!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • deekayen committed fd7726b on 7.x-1.x, 8.x-1.x authored by bdone
    Issue #1911038 by fraweg, bdone: Notice: Array to string conversion.