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.
When invoking hook_user implementations, Bakery 6.x-2.x-dev causes a bunch of PHP warnings such as:
"Parameter 2 to pathauto_user() expected to be a reference, value given in /home/web/wwwprod/html/includes/module.inc on line 497." Hook_user implementations expect parameters 2 and 3 to be references.
In bakery.module on line 1497, in the call to module_invoke_all, change NULL to $null=NULL
Old:module_invoke_all('user', 'logout', NULL, $user)
New:module_invoke_all('user', 'logout', $null = NULL, $user)
Comment | File | Size | Author |
---|---|---|---|
#3 | 1459294-bakery-user_invoke_warnings.patch | 578 bytes | neclimdul |
#2 | bakery-module_invoke-1459294-0.patch | 408 bytes | Sborsody |
Comments
Comment #1
gregglesThanks for your bug report and for helping make this a better module. Could you provide this as a patch?
Comment #2
Sborsody CreditAttribution: Sborsody commentedOK, if you insist.
Comment #3
neclimdulSeems user_module_invoke might actually be the right way to be calling this.
Comment #4
coltraneCommitted modified version of #3 http://drupalcode.org/project/bakery.git/commit/fef379d
I don't think D7 needs user_module_invoke() because according to http://api.drupal.org/api/drupal/modules!user!user.module/function/user_... 'logout' isn't a valid choice.
Comment #5
neclimdulSeems reasonable. The 7.x does not have the same code that was causing this warning so it seems that's already been dealt with.
Comment #6.0
(not verified) CreditAttribution: commentedAdding corrected code