Hopefully I haven't missed a similar bug in the queue.

Drupal 6.20
PHP 5.3.2

Installed and enabled automenu API and node sub-module, and got the dreaded WSOD trying to access the modules page, and reports pages. Other admin pages were fine.

The following PHP error was reported:

Parameter 2 to automenu_node_automenuapi() expected to be a reference, value given in {webroot}/includes/module.inc on line 462.

The $params parameter is set up as a reference var. Since the function doesn't update $params, I simply removed the & to remove the error, and haven't had any problems yet (I've successfully set up a content type to auto-add a menu item).

I know I've seen this error thrown with PHP 5.3 when objects were being passed by reference, but $params is being accessed as an array, and not causing any issues that I've come across, so not sure if my "fix" is proper or not.

CommentFileSizeAuthor
#8 Bugfix.patch918 bytestehnodeer

Comments

sammo’s picture

+1

Johnny vd Laar’s picture

I've committed a fix for this problem so please let me know whether this resolves your issues.

Johnny vd Laar’s picture

Status: Active » Needs review
Helrunar’s picture

I have tested it with PHP 5.3.5 and all work fine ;-)

amilne’s picture

Status: Needs review » Closed (fixed)

Apologies for the lack of response; seems my email notifications are disabled. I've installed this module on two new sites since, and had no issues, so problem solved - thanks Johnny!

Anonymous’s picture

Drupal 6.25 and version 2.0 of this module keep returning this error as well as a WSOD.
I am using the dev version now, and it seems to be ok.

I've tried reinstalling the module using DEVEL reinstall feature but to no avail. I'm not sure which database entries to delete to wipe it completely.

Has anyone experienced the error again? I can't even use the update.php feature to make any database updates, and clearing cache/running cron does nothing as well. I get WSOD on almost every page.

dev 2.x version seems to be ok?

sdowney2002’s picture

Status: Closed (fixed) » Needs work

I'm having the same issue as Careless. Running 6.25 and installed 6.x-2.0 yesterday. This morning, my hosting provider upgraded to PHP 5.3 and I got WSOD on /user pages. Watchdog also reported the "Parameter 2 to automenu_node_automenuapi() expected to be a reference" error as well.

Had to disable AutoMenu via the database.

Sorry, but I'm re-opening this ticket.

tehnodeer’s picture

Status: Needs work » Needs review
StatusFileSize
new918 bytes

Guys, got a solution. Try it and give feedback!

sdowney2002’s picture

That bugfix patch seems to have done the trick. Thanks so much!

(Drupal 6.25 Automenu 6.x-2.0)

puddyglum’s picture

Yes, #8 did the trick and I don't see how it will cause any problems. Probably need to commit #8 soon as I've seen other developers say they couldn't get this module to work...

aiphes’s picture

same issue :
Parameter 2 to automenu_node_automenuapi() expected to be a reference, value given module.inc:476

with php 5.3.10...hope an update of the module fix this

Anonymous’s picture

#8 did it for me, I was having admin screen white screen of death, and found the error being recorded in the database log.
I had just update php to 5.3 from 2.x

askibinski’s picture

Status: Needs review » Reviewed & tested by the community

#8 works, tested with PHP 5.3.14.

aiphes’s picture

idem here, login page break by automenu

Parameter 2 to automenu_node_automenuapi() expected to be a reference, value given dans /site/includes/module.inc à la ligne 476.

give up this module until next update...

ottawaclo’s picture

sorry for being a noob..but where do you put that code in at exactly in the module.inc file?

wylbur’s picture

Issue summary: View changes

The patch in #8 has also resolved my WSOD issues with the 2.0 version of the module.