Errors upon successful login
| Project: | CAS |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Upon successfully logging into Drupal via the CAS module, the following is displayed above the "Logged in via CAS as /username/" message:
* warning: Parameter 3 to block_user() expected to be a reference, value given in /srv/http/drupal/includes/module.inc on line 471.
* warning: Parameter 3 to comment_user() expected to be a reference, value given in /srv/http/drupal/includes/module.inc on line 471.
* warning: Parameter 2 to dblog_user() expected to be a reference, value given in /srv/http/drupal/includes/module.inc on line 471.
* warning: Parameter 2 to node_user() expected to be a reference, value given in /srv/http/drupal/includes/module.inc on line 471.
* warning: Parameter 3 to system_user() expected to be a reference, value given in /srv/http/drupal/includes/module.inc on line 471.
* warning: Parameter 2 to user_user() expected to be a reference, value given in /srv/http/drupal/includes/module.inc on line 471.
Google didn't turn up anything, so here I am again.

#1
Looks like you might be running into a PHP 5.3 compatibility bug? Try upgrading to the current version of drupal core 6.1.14 or greater.
#2
I'm running 6.1.14 to my knowledge (this package: http://www.archlinux.org/packages/community/any/drupal/), so I should be alright in that department?
#3
Yeah that should be good enough. I did more research and realized that to support php 5.3 we have to change how we call hook_user. I'm having some troubles with my drupal cvs account (which I should be able to resolve in 1/2 hour or so), but on approximately line 278 change the module_invoke_all call to read as follows:
module_user_invoke_( 'login', NULL, $user);
This should work, but I don't have php 5.3 to test it.
#4
Thanks for the information. I am using the stable version, so the line numbers were a bit different. Method name was a little different too (guessing you pulled it off the top of your head)
I changed the following:
Line 162: module_invoke_all('user', 'login', null, $user); to user_module_invoke('login', $NULL, $user);
Line 206: module_invoke_all('user', 'login', null, $user); to user_module_invoke('login', $NULL, $user);
Line 579: module_invoke_all('user', 'logout', NULL, $user); to user_module_invoke('logout', $NULL, $user);
It seemed to work with just changing 162, but I changed the rest for consistency's sake (not really knowing what I'm doing, figure you'll make them right anyhow). Logout redirection doesn't seem to work, but I am think that's independent of these changes. I'll look through the other issues and try to pinpoint that (minor annoyance, since it will at least redirect to the drupal root, which is fine-ish).
#5
Yep, thanks for noticing those. I've updated them accordingly. Logout redirection shouldn't be related to these changes. There's definitely an issue that describes most of the problems related to those. I think there is a patch in the latest release that deals with it.
#6
Fixed in head. Will patch and roll with next stable release.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.