I just created a fresh drupal 4.7 beta 4 install. After creating the first user, changing the users password on the following screen and clicking submit generates the errors:

* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/jsaints/lil/includes/form.inc on line 180.
* warning: Missing argument 1 for password_confirm_validate() in /var/www/jsaints/lil/includes/form.inc on line 595.

CommentFileSizeAuthor
#6 user_pwd.patch637 byteschx

Comments

quibus’s picture

changing line 180 in /includes/form.inc

$args = array_merge(array($elements), $args);

into

$args = array_merge(array($elements), array($args));

Fixes the bug

cosmicdreams’s picture

Title: change password fails » same here

lunatix suggested to try this. here's the text of his post:

To fix this quick and dirty:

Change line 180 in /includes/form.inc from:
$args = array_merge(array($elements), $args);

into
$args = array_merge(array($elements), array($args));

This removes the error!

Note 1: I have no experience in drupal development, just php hacking.
Note 2: This is NOT an official fix!!

After trying this i have additional issues. Try this out and let me know if you have additional issues too.

cosmicdreams’s picture

quibus or anyone. After modifiying the code as above, I get these warnings:

Sorry. Unrecognized username or password. Have you forgotten your password?
warning: array_keys(): The first argument should be an array in /home/spatials/public_html/drupal/modules/user.module on line 341.
warning: implode(): Bad arguments. in /home/spatials/public_html/drupal/modules/user.module on line 341.
user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/spatials/public_html/drupal/includes/database.mysql.inc on line 124.

cosmicdreams’s picture

Title: same here » change password fails
jsaints’s picture

change title back to original

chx’s picture

Assigned: Unassigned » chx
Status: Active » Reviewed & tested by the community
StatusFileSize
new637 bytes
chx’s picture

Status: Reviewed & tested by the community » Needs review

I am way too tired to dare to set to PRTbC.

jsaints’s picture

Patch fixes the problem. And doesnt seem to cause new ones.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Then I set it back. I know it fixes the problem, I just fucked up #validate arguments when writing the #submit patch. But I do not have bloody PHP5 so it did not fire.

tfejos’s picture

I confirm, patch works well. "The changes have been saved."

chrisd’s picture

6 submitted by chx on January 27, 2006 - 14:55

Corrected the problem. I can now login to my Beta 4 system.

kvarnelis’s picture

this didn't work for me.

i never got any errors, and i do get "changes saved" after changing my password, but login results in "Sorry. Unrecognized username or password"

patch or no patch.

user history for me reads as "array"

drewish’s picture

+1 chx's patch works. i think kvarnelis's problem is related to http://drupal.org/node/40200

dries’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. Committed.

nathandigriz’s picture

Has this patch really been committed? I just downloaded a compressed file and got

* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /includes/form.inc on line 180.
* warning: Missing argument 1 for password_confirm_validate() in /includes/form.inc on line 595.

Or is it that the file compression script has not run for the latest changes? Should I be using CVS?

chx’s picture

cvs you want.

Anonymous’s picture

Status: Fixed » Closed (fixed)