Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Created a test user account .
After successful testing of the module, when i tried to delete the account from here,
http://example.net/user/4/edit
i got the error,
# warning: array_keys(): The first argument should be an array in /usr/local/apache/htdocs/modules/user.module on line 1006.
I am using drupal 4.5rc
Comment | File | Size | Author |
---|---|---|---|
#5 | user_delete.patch | 874 bytes | chx |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedare you running php 5?
Comment #2
gkrishna CreditAttribution: gkrishna commentedphp-4.3.9
Comment #3
Steven CreditAttribution: Steven commentedIt sounds like a problem when no roles are set. This could happen before, through a bug where user roles got lost if the user form didn't validate while editing. But this bug was fixed in 4.5 RC.
It could be that editing the user during 4.5 RC caused the roles to be lost, and that you now have a broken user account, even though this is no longer possible in 4.5 final.
Comment #4
baudolino CreditAttribution: baudolino commentedI just got the same error on Drupal 4.5 final. I created a test user, then tried to delete it. It complained first that the user has to be blocked. Fine. I blocked the account, hit delete and then it said "user not found". The account was deleted, however.
The log entry for this event was:
warning: array_keys(): The first argument should be an array in [path-todrupal]\modules\user.module on line 1039.
I was logged in as user #1.
Comment #5
chx CreditAttribution: chx commentedI have even encountered this in the CVS version. The sequence of add, block, delete causes this. A very simple fix follows. Will submit as a patch for CVS, too.
Comment #6
Dries CreditAttribution: Dries commentedI can't reproduce this problem with HEAD. All users need to have at least one role. If they don't have at least one role, something else is wrong (which implies this patch fixes the sympthom, not the problem).
Comment #7
chx CreditAttribution: chx commentedThis is strange. I can not reproduce now it either. But I yesterday I could do it with ease, see http://drupal.org/node/15511 , I have submitted the error message straight from the watchdog. So it _did_ happen.
I'll try again to reproduce this...
Comment #8
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedApparently some form of ghost bug.
Comment #9
(not verified) CreditAttribution: commented