I am using Path Access to restrict only authorized users to my site. After upgrading my Drupal install and updating the modules, I get this error after a user signs up for an account:
warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/leadersf/public_html/modules/role_weights/role_weights.module on line 274.
The same error occurs 6 times on the page .... the user account is created. I don't actually have anything enabled in the settings for Role Weights. I just have it because Path Access depends on it.
Any suggestions on fixing the error?
Comments
Comment #1
pfaocleLooks like when path_access module enabled, the function
path_access_init()at line 35:is called at page load. If the user is registering
$user->rolesis empty/null. Can you try the attached patch to see if it rectifies the errors? Basically, if the $roles variable passed to role weights is empty, we don't need to check roles or return any values.Comment #2
bsuttis commentedJust wanted to say that the patch fixed the issue for me, thanks much.
Comment #3
pfaocleComment #4
pfaocleCommitted this to 5.x-1.x-dev, 6.x-1.x-dev and HEAD. Please test the relevant new dev release - will roll a new release soon.