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.
Hello! :-)
Multiple messages like the one below spawns in the UI when enabling the Forum Access module. No matter which link in the administration menu I open, at least a few lines like below will appear.
Deprecated function: Call-time pass-by-reference has been deprecated in drupal_load() (line 935 of /var/www/example.com/drupal-7.0-rc1/includes/bootstrap.inc)
Using ACL 7.x-1.0-beta1 and Forum Access 7.x-1.0-apha1 with D7 RC-1. Disabling the Forum Access module removes the error.
Comments
Comment #1
Aonoa CreditAttribution: Aonoa commentedI just wanted to add that this error does in fact appear at the top of every page on the site after enabling the module. It seems like the module still works while this is popping up, but it's not visually appealing, especially not if I want to use this on a live site.
Comment #2
Aonoa CreditAttribution: Aonoa commentedI found out that this is the fault of a php.ini configuration setting.
I had "allow_call_time_pass_reference = Off", setting it to "On" solved this issue.
Comment #3
salvisHmm, according to http://php.net/manual/en/ini.core.php this defaults to 1 and it's deprecated.
I have D7 RC1, bootstrap.inc 1.449, but line 935 is
I can't investigate this any further, but I doubt this is really an FA issue.
Comment #4
Aonoa CreditAttribution: Aonoa commentedIndeed, I don't know what it might be. This function it mentions will be removed from php in the future, I guess. By allowing the feature to run in php.ini I don't get the message anymore, but if we're certain it's not in FA, we might as well close this issue.
Best regards,
Ao
Comment #5
salvisYes, I think at this point there's nothing to do.
Thank you for your feedback.
Comment #6
Heine CreditAttribution: Heine commentedThe error message is rather unhelpful as this error is generated during the forum access include in drupal_load. It is caused by this snippet:
Comment #7
salvisOh! Thanks for putting the finger on it.
Fixed in the -dev version (give it up to 12h to be repackaged).
Comment #8
kjikaqawej CreditAttribution: kjikaqawej commented; This directive allows you to enable and disable warnings which PHP will issue
; if you pass a value by reference at function call time. Passing values by
; reference at function call time is a deprecated feature which will be removed
; from PHP at some point in the near future. The acceptable method for passing a
; value by reference to a function is by declaring the reference in the functions
; definition, not at call time. This directive does not disable this feature, it
; only determines whether PHP will warn you about it or not. These warnings
; should enabled in development environments only.
; Default Value: On (Suppress warnings)
; Development Value: Off (Issue warnings)
; Production Value: Off (Issue warnings)
; http://php.net/allow-call-time-pass-reference
Thought it might be useful to post the comments ;). (emphasis mine)
Comment #9
Honza Pobořil CreditAttribution: Honza Pobořil commentedSame issue but for different modules. The bug is in core.
Comment #10
BerdirNo, it is not.
Open a new issue for the module you are experiencing this error. Core is not doing anything wrong.
Comment #11
Honza Pobořil CreditAttribution: Honza Pobořil commentedBtw, I dont use the Forum Access module.
Comment #12
Heine CreditAttribution: Heine commented@Bobík, the obvious conclusion is that another contributed module or theme you use tries to pass by ref on call time.
You can find out which module it is by installing devel and enabling its backtrace error handler. The module containing the error should be listed in the backtrace as an argument ($type, $name).
When found, open an issue for the module/theme causing this.
Comment #13
Honza Pobořil CreditAttribution: Honza Pobořil commentedI updated the Views nodule to the dev version and the errors is out. Thank you for your time :-)
Comment #14
drm CreditAttribution: drm commentedI started getting this error when moving to a new host. Is there a php setting or parameter that could cause this?
Comment #15
salvisNo, it depends on your PHP version.
Please update to the latest -dev version, and if the error persists then open a new issue and post the exact error message.