After I installed the module, I keep to get this error message:

Warning: Parameter 1 to theme_admin_menu_links() expected to be a reference, value given in theme() (line 617 of /Library/WebServer/Documents/dr63/includes/theme.inc).

Comments

Freso’s picture

Ditto here, on a completely fresh install.

justadropofwater’s picture

Same error, on fresh install. LAMP on Suse 11.2. Apache/2.2.13, PHP 5.3.0, Drupal 6.15. Subscribing. Please let me know if you want any additional information. Thank you.

socketwench’s picture

Same here. Arch Linux, Apache 2.2.14, PHP 5.3.1, Drupal 6.14.

Funny thing: It works on the production server, which I believe is Debian.

mootoo1’s picture

same problem :(

Freso’s picture

@tessmonsta: Is your production server running a PHP less than 5.3 by any chance? That PHP 5.3 seems to be the golden thread through these reports.

masood_mj’s picture

I believe that the problem is the php version. My previous php works well but the current (5.3.1) shows this error and cannot show the administration menu. Besides, as it removes adminstration menu item from the navigation menu, there is no straight way to access the admin panel unless typing the urls!!

Freso’s picture

Title: Parameter 1 to theme_admin_menu_links() expected to be a reference » [PHP 5.3] Parameter 1 to theme_admin_menu_links() expected to be a reference
Priority: Normal » Critical
Issue tags: +PHP 5.3

I think it's save to call this bug a critical one for those using PHP 5.3, then.

hutch’s picture

I haven't got PHP 5.3.x and only use the stable version of admin_menu, but I got curious about this so I grepped the alpha3 version for 'admin_menu_links' and spotted this:

admin_menu.module:571:function theme_admin_menu_links(&$elements, $depth = 0) {
admin_menu.module:602: $elements[$path]['#children'] = theme('admin_menu_links', $elements[$path], $depth_child);

This looks like an attempt to recurse a function into itself and $elements[$path] would be a value in this context. Anyone in a position to test this might like to try either removing the '&' from line 571 of admin_menu.module or replacing $elements[$path] with $elements in line 602 and see what happens. My hunch is that the former will fix it but there might be ramifications elsewhere.
A job for the author I think.

dave reid’s picture

Status: Active » Closed (duplicate)

This has already been fixed in the latest code, 6.x-1.x-dev with #586228: Doesn't work with PHP 5.3.0 .

Cody G’s picture

Not sure if this is the exact same issue... except it's php 5.3x related.

warning: Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in xxx/public_html/includes/module.inc on line 483.

My system was upgraded to php 5.3.1 on Jan 20 (CentOs). That upgrade was a good thing, but that's when the warnings started on my newish install of D6.15. I'm happy nothing really broke, but it was near impossible to work with all the displayed warnings. Anyways, after manually applying the patch for the calendar mod, and then using the same principle for the date mod, those warnings went away. However, the admin_menu() is throwing expected to be a reference warnings too. So, what is the solution to make this warning go away?

sbuts’s picture

admin_menu.module line 571
change
function theme_admin_menu_links(&$elements, $depth = 0)
to
function theme_admin_menu_links($elements, $depth = 0)

alternata99’s picture

New at Drupal.
Installation in localhost (XAMPP+Drupal 6.16).

Get a red alert:

"warning: Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in F:\xampp\htdocs\drupal\includes\module.inc on line 483."

Somebody with a solid idea: what's the meaninig of it and what to do and how, PLEASE let me know about it.

Thanks in advance.
alternata99@gmail.com

socketwench’s picture

Yeah, that was the problem. Running a back version of PHP was a workaround.