Since PHP5.3, following error message seems to be frequent on several sites:
warning: Parameter 1 to drigg_link() expected to be a reference, value given in /customers/nedsatt.se/nedsatt.se/httpd.www/includes/module.inc on line 406.

In my case, I am not sure at all where the call is coming from, but this bug report i questioning why the function needs a reference. It is not doing anything to the object.

So, the easiest and to avoid problems is to change this function definition to remove the '&'.

CommentFileSizeAuthor
#7 drigg_link_fix.patch46.07 KBkolier
#6 drigg_link_fix.patch1.38 KBkolier

Comments

Mars2012’s picture

Priority: Normal » Critical

In my case the warning is:
warning: Parameter 1 to drigg_link() expected to be a reference, value given in ...\htdocs\[mySite]\includes\module.inc on line 483.

What can I do to solve the problem?

magic72’s picture

You can try to just remove the '&' in front of parameter in the function definition of drigg_link()
It worked for me.

arrisweb’s picture

where to remove that ?
Please help

adrupal’s picture

drupal6home/modules/drigg/drigg/helpers.inc contains the drigg_link function definition. As mentioned in the prev post just remove the '&" in front of the parameter in the function definition. Still wondering if this is a drupal issue or a PHP 5.3 issue. Anyone has any better insights into this?

kolier’s picture

This function drigg_link() conflicts with the hook_link()
It's better to rename this function while it doesn't have anything do with hook_link()
The comment said that this is only a theme helper function

kolier’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB

Suggest rename drigg_link() to drigg_url_link()

kolier’s picture

StatusFileSize
new46.07 KB

CVS diff generated patch

Chrys’s picture

Assigned: Unassigned » Chrys
Status: Needs review » Fixed

Fixed and commited. Thanks Kolier.

Status: Fixed » Closed (fixed)
Issue tags: -reference, -drigg_link, -pass by reference

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