I'm getting white screen while using this module. Elsewhere it works nice, but in one environment it does not. White screen happens, when trying to alter roles on users through Role delegation -tab (ie. with no administer users -permission).
PHP Fatal error: Cannot use object of type stdClass as array in ... modules/role_delegation/role_delegation.module on line 209
How could I debug this for you? I'm using bunch of other user-related modules, but have no idea if this is realated to those modules or not.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | listmodules.txt | 464 bytes | Andrew Schulman |
Comments
Comment #1
AlexisWilke commentedI guess you'd need to add another elseif...
Comment #2
Andrew Schulman commentedI'm not able to reproduce this problem with current 6.x-1.x-dev. I created a role with "access user profiles" but not "administer users", and gave it a few role assignment permissions. Logged in as a user with that role, went to another user's profile, Role tab, changed some of the roles, and clicked on Submit. The assignment succeeded and there were no errors.
I guess there wouldn't be any harm in applying the patch in #1. But I'd like to know first that there's a reason for it, and when it would be used. When is $edit an object and not an array? The API says that $edit is an array, so this sounds like a possible case of misuse by another contributed module.
Comment #3
AlexisWilke commentedAndrew,
Looking at the user.module functions, there isn't any that would imply that $edit (or $array) can be something other than an array. Although a few functions can be called without checking the type of $edit and thus possibly passing an object (probably the $user object.)
I indeed think you are correct saying that it is someone else responsibility.
Now, it is possible for $account to be an array (i.e. when $op is 'validate').
Thank you.
Alexis
Comment #4
Andrew Schulman commentedAlexis, thanks.
rpsu, are you still able to reproduce this bug? If you are, you can help by running the attached file and sending me the output, which is just a list of your currently active modules and their locations (to help filter out core modules).
To run it, save the attachment as listmodules.php in the root directory of your site, then go to e.g. http://www.yourdomain.com/listmodules.php. Then save the result and attach it here, or you could probably also just copy and paste the result here.
With the list of your modules, I may be able to reproduce the bug. If I can reproduce it, I can squash it.
Comment #5
benjy commentedDrupal 6 support has now been dropped.