Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Call-time pass-by-reference has been deprecated


ptrinephi

Recommended Posts

Hi,

 

I'm getting this error on this function call:

 

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 /includes/classes/pad_multiple_dropdowns.php on line 119

 

Line 119:

 

$this->_build_attributes_combinations($attributes, false, 'None', &$combinations, &$selected_combination);

 

The message says: "If you would like to pass it by reference, modify the declaration of [runtime function name]()" What exactly does that mean?

 

What to do?

Link to comment
Share on other sites

The message says: "If you would like to pass it by reference, modify the declaration of [runtime function name]()" What exactly does that mean?

 

It means that PHP no longer supports passing arguments by reference in the actual fuction call (this is what the "&" parameter modifiers are trying to do) - you would need to modify the function prototype (definition).

 

Try changing

$this->_build_attributes_combinations($attributes, false, 'None', &$combinations, &$selected_combination);

 

 

To $this->_build_attributes_combinations($attributes, false, 'None', $combinations, $selected_combination);

 

 

If the code really does require passing by reference (i.e. if the parameters are modified in the function itself, and then used further down the line), you will either have to modify the function definition or change your php.ini file, as suggested in the message.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...