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.
With role_change_modify module enabled, when I change a role for a user, the role_change_notify_user_update() function do a hook call via module_invoke_all() with improper arguments order which make some hooked module fail with a Cannot use object of type stdClass as array exception.
Comment | File | Size | Author |
---|---|---|---|
#2 | role_change_notify.remove_hook_invocation_736086_02.patch | 4.76 KB | rfay |
#1 | role_change_notify.remove_hook_invocation.patch | 4.83 KB | rfay |
role_change_notify.patch | 708 bytes | heltem | |
Comments
Comment #1
rfayAnd how right you are.... But it goes beyond that. Why did the hook need to be invoked in the first place. This patch removes the hook invocation and cleans up token handling. It was not pretty in there.
I'd appreciate your review and testing on this. I think I'll spend the rest of the day getting D6 tests ready for this.
Comment #2
rfayFound yet another bug... But it was writing the test that flushed it out :-)
Comment #3
rfayCommitted to DRUPAL-6--2: http://drupal.org/cvs?commit=339520
This one will deserve a release, as this is a severe bug that heltem has caught.
@heltem: If you can try this out and report back it will be much appreciated. Will be in the next dev.
Comment #4
heltem CreditAttribution: heltem commentedApplied your patch.
Tried.
Looks good.
Thank you.
Comment #5
rfayThank *you*. You're turning in to an excellent contributor.