Warning: Call-time pass-by-reference has been deprecated in /home/html/sites/all/modules/total_control/total_control.module on line 114

Warning: Call-time pass-by-reference has been deprecated in /home/html/sites/all/modules/total_control/total_control.module on line 117

Warning: Call-time pass-by-reference has been deprecated in /home/html/sites/all/modules/total_control/includes/total_control.views.inc on line 816

Warning: Call-time pass-by-reference has been deprecated in /home/html/sites/all/modules/total_control/includes/total_control.views.inc on line 818

Comments

pobster’s picture

Title: Godaddy Bug Sighted » Bad coding practise; Using call-time pass-by-reference which has been deprecated

Easy fix as the functions can use call-by-reference it's just not declared on the 'calling' functions variables.

Pobster

jenlampton’s picture

Status: Active » Fixed

Thanks for the catch, I've committed the fix to HEAD. It will be included in the next release.
Jen

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tobias’s picture

Version: 6.x-1.0-rc4 » 6.x-1.x-dev

FYI - I'm still getting this using the latest dev release.

-T

jenlampton’s picture

Status: Closed (fixed) » Active

Hm, ok I'll look into it. (marking as active)

jenlampton’s picture

Status: Active » Needs review

I just installed the latest dev release (2009-Aug-26) and I'm not getting the error. Can you paste the error message and tell me which page you got it on? the admin/build/modules page? right after you enabled it? Can someone else please confirm this is stil an issue?

Jen

carvalhar’s picture

yeah, it's still an issue.

igot the same problem in modules and dashboard page using realase from august.

Warning: Call-time pass-by-reference has been deprecated in /var/www/html/bertin/sites/all/modules/total_control/total_control.module on line 108

Warning: Call-time pass-by-reference has been deprecated in /var/www/html/bertin/sites/all/modules/total_control/total_control.module on line 111

Warning: Call-time pass-by-reference has been deprecated in /var/www/html/bertin/sites/all/modules/total_control/views/control_content.view on line 843

Warning: Call-time pass-by-reference has been deprecated in /var/www/html/bertin/sites/all/modules/total_control/views/control_content.view on line 845

carvalhar’s picture

I fixed it by adding this flasg at my .htaccess:
php_flag allow_call_time_pass_reference 1

This error occurs because the default in php.ini isn't allow_call_time_pass_reference = true.

matteoraggi’s picture

my php.ini say:
allow_call_time_pass_reference = On
but I get these 2 line of error:
Warning: Call-time pass-by-reference has been deprecated in ..../sites/all/modules/total_control/total_control.module on line 108

Warning: Call-time pass-by-reference has been deprecated in ..../sites/all/modules/total_control/total_control.module on line 111
using total control version 6.x-1.0 .

pobster’s picture

Changing the php.ini is NOT a fix, it's a workaround. The 'fix' is to go to the lines in question in the module and remove the ampersand preceding the variable. e.g.

total_control_add_views_pane_display(&$view, $content_type, $machine_type);

Becomes;

total_control_add_views_pane_display($view, $content_type, $machine_type);

Incidentally, the reason your installation hasn't picked up the change you made is because you need to restart your webserver. BTW, I don't think the latest version of dev suffers from this problem anyway.

Pobster

matteoraggi’s picture

with my www.drupalps.com hosting I can restart my web server, but my php.ini just was setted in this way:
allow_call_time_pass_reference = On
and from last changes of php.ini I rebooted about 20 times.
If you think that .dev is enough stable for a working site, I'll be happ to install it, or you suggest to just do these 2 lines of change for now?

pobster’s picture

I have nothing to do with this module (I just enabled it on a work project and so, need it to work!) so I can't really comment as to whether it's stable or not. For the project we have, this module is spot on - but we've not really used it probably as fully as it's capable of. It's been fine for me though?

Anyways, sounds like there is an overriding php.ini (which isn't unusual tbh) so yes, sounds like your only option is to remove those ampersands. This isn't a hack btw, it's deprecated behaviour from an older version of php - this is just the new way to do it. As long as the function being called has ampersands then the call to it doesn't need them.

Pobster

matteoraggi’s picture

Ok, I changed this line into file total_control.module, then I get this error line on admin folder:
Warning: Call-time pass-by-reference has been deprecated in ....../sites/all/modules/total_control/total_control.module on line 111
but I'm using the last stable version, not the .dev maybe t is the problem?

pobster’s picture

Just do the same thing on that line as you did for the previous line (remove the ampersand), apologies I assumed that my explaining it and the reasoning for it would make it clear that it wasn't a one line fix (as you have two or possibly more error messages).

Pobster

flavor’s picture

I installed total control on a client web site PHP 5.16 and this is what total control 6.x-1.0 kicked out:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/html/sites/all/modules/total_control/total_control.module on line 108

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/www/html/sites/all/modules/total_control/total_control.module on line 111

pobster’s picture

Hi... Scroll up...

Pobster

jenlampton’s picture

Status: Needs review » Fixed

Hi all,

Sorry for the pass-by reference, It was indeed still in the dev version. I have pulled it out in the 1.1 release, so I'm marking as fixed. Feel free to re-open if it returns.

@pobster particular thanks to you for providing the needed advice :-)

Jen

pobster’s picture

A pleasure to be of assistance ;o) And loving the module btw! I wish I could tell you who we have using it but client confidentiality prevents me... I'm sure you would be quite pleased though!

Pobster

jenlampton’s picture

@pobster

Awesome :-)

Jen

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.