Closed (works as designed)
Project:
Real Name
Version:
7.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2011 at 11:40 UTC
Updated:
19 Feb 2011 at 09:43 UTC
The drupal_alter() in realname_update() does not pass arguments by reference, and thus, the hook_realname_alter/patter_alter simply don't work. The attached patch fixes this problem. Tested manualy on my local dev.
| Comment | File | Size | Author |
|---|---|---|---|
| realname_alter.patch | 976 bytes | mariusz.slonina |
Comments
Comment #2
dave reidNope this is incorrect (see the note section on http://php.net/manual/en/language.references.pass.php). It is the responsibility of the hook to have its parameter referenced just like all other alter hooks in Drupal - the exception being if the parameter is an object, which is has a reference to the object passed by default as of PHP 5. But the $realname parameter is not an object - it's a string.
Comment #3
mariusz.slonina commentedThanks, you're right, I wasn't aware of that, anyway it seems I had some weird caching problem or so, but it works now :)