After my web host moved me to a new server running PHP 5.3.6, I started getting *piles* of these errors in my log file: "Parameter 2 to me_load() expected to be a reference, value given in /var/www/html/includes/menu.inc on line 407."

I'm running Drupal 6.2, which is supposedly PHP 5.3-friendly.

I'm not sure if me_load needs to be more tolerant or if menu needs to be more careful, but somebody is irritating PHP 5.3.

Thanks for your hard work on this,
- Tim.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neilnz’s picture

This sounds like the same issue as I'm having with me_uid_optional_load() expecting $map to be a reference. See also #1252424: Incompatible with 'me' aliases for this causing a problem with the UC Addresses module indirectly.

Is there a good reason for $map to be taken by reference? If not, let's patch to remove the &

neilnz’s picture

Title: Parameter 2 to me_load() expected to be a reference » Parameter 2 to me_*_load() expected to be a reference
Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Needs review
FileSize
1.81 KB

Well here's a patch to do it in case anyone needs it.

Basically just replaced all instances of &$map with $map in the loader function definitions.

This may or may not apply to the D7 version, depending on how menu.inc works. I can't see any sign that _menu_check_access() in D7 behaves any differently than the D6 one. The same call_user_func_array() call is used to invoke the loader function, which will probably cause the same problem.

tomsm’s picture

I had the same problem after my webhost updated php from 5.2.x to 5.3.10.
My drupal version is 6.25.
Applying this patch solved it. Thank you!

deggertsen’s picture

FileSize
1.97 KB

Here is a patch for the D7 version. Unfortunately, even though this patch fixes this error I'm getting a large number of other errors that will require me to uninstall =(

berenddeboer’s picture

Priority: Normal » Critical
Issue summary: View changes

Get "The message: Warning: Parameter 2 to me_load() expected to be a reference, value given in _menu_load_objects() (line 590 of /includes/menu.inc)."

Installing me actually breaks a site.

berenddeboer’s picture

Version: 6.x-2.x-dev » 7.x-1.1
gaele’s picture

Version: 7.x-1.1 » 7.x-1.2
gaele’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies and works for me on 1.2.

Anybody’s picture

Version: 7.x-1.2 » 7.x-1.x-dev