Warning: Call-time pass-by-reference has been deprecated

Joined: 07/16/2008
Juice: 276

So far my experience with marketplace has been great. I've installed it, configured it a little and setup the structure of most of my website. So far so good.

I found a small issue on a server I installed it on which has PHP warnings enabled.

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of module_invoke_all(). 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 in /home/eocean/dev/htdocs/sites/all/modules/ubercart_marketplace/mp_products/mp_products.module on line 219

Here's line 219

<?php
       
// invoke hook_list_product()
       
module_invoke_all('list_product', &$node);
?>

I believe it should be changed to

<?php
       
// invoke hook_list_product()
       
module_invoke_all('list_product', $node);
?>

This removes the pass by reference. I grepped all of market place's and ubercart's code to see if anything uses this list_product hook, but nothing turned up. Reason I'm posting this here is because I'm unsure if there's an intensional reason for doing this that I'm un-aware of....if not, it's a quick fix to resolve the warning.

Look forward to digging harder into it next week as I start to theme my site.

Thanks again,
Jordan

Ubercart Marketplace - Multiple Seller Support By: Turgrid (65 replies) Fri, 06/27/2008 - 12:35