On a virgin installation, when setting up a new user, and clicking on the q=user/reset link provided in the email, I get the following error:

Fatal error: Cannot use string offset as an array in /path/to/includes/form.inc on line 641

Logging in using the q=user link works just fine.

CommentFileSizeAuthor
#3 user_reset_help.patch1.06 KBChrisKennedy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jonnay’s picture

(Sorry, it does say so in bold...)

OS: Debian GNU Linux (stable)
PHP Version: 5.1.6 Running with APC (3.0.10) on Apache 1.3

tcblack’s picture

Confirmed on my install.
Cannot use string offset as an array in /home/stilbla0/public_html/drupalbeta/includes/form.inc on line 641
Occurs when I attempt to reset a password and click the supplied link from the email.

ChrisKennedy’s picture

Status: Active » Needs review
FileSize
1.06 KB

I believe the problem lies in this commit:

http://cvs.drupal.org/viewcvs/drupal/drupal/modules/user/user.module?r1=...

The attached patch should fix the problem.

The form['help'] code has an error in the nesting of the parentheses:

-          $form['help'] = array('#value' => '<p>'. t('This login can be used only once.')) .'</p>';
+          $form['help'] = array('#value' => '<p>'. t('This login can be used only once.') .'</p>');
RobRoy’s picture

Version: 5.0-beta2 » 5.x-dev
Status: Needs review » Reviewed & tested by the community

Nice catch.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

ChrisKennedy’s picture

Title: Fatal error: Cannot use string offset as an array in /path/to/includes/form.inc on line 641 on new user » Password reset: fatal error for form.inc string offset

Clearer title for future reference.

scriptnews’s picture

Title: Password reset: fatal error for form.inc string offset » Same Error some lines below - Password reset: fatal error for form.inc string offset

Same error, some lines below ...

form.inc on line 658

Anonymous’s picture

Status: Fixed » Closed (fixed)