The error was warning: array_unique() [function.array-unique]: The argument should be an array in /sites/all/modules/boost/boost.module on line 808.
It seems to be happening because occasionally $menu is an empty array.
To fix this I just initialised the structure array at the beginning of the function.
Additionally I noticed a typo on line 794
$structure[$item['link']['link_path']][] = $sub;
The variable $sub is never defined (AFAIK) - I guess it should be $sub_menu.
Patch attached...
As the comment says above the boost_get_menu_structure()... ugly code :)
p.s. Thanks for a great and amazing module - got a 2gb VPS serving 4000+ requests per seconds... awesome!
Comments
Comment #1
alexpottSomehow the patch fell off the post :(
Here it is.
Comment #2
mikeytown2 commentedpatch looks simple enough, committed.
http://drupalcode.org/viewvc/drupal/contributions/modules/boost/boost.mo...
Comment #3
alexpottIt seems that this issue was solved before #673874: array_unique() error - I did look in the issue queue before posting but I obviously missed it...
The previous fix added the checks
which are now unnecessary as the $structure is initialised to an array.
Patch attached to remove them as it is probably slightly quicker to initialise rather than do the two tests on the $structure variable.
Comment #4
mikeytown2 commentedcleanup code gets run once... I'm not too worried about this ATM. If you think it's important I'll commit it but to me the patch doesn't seem necessary.
Comment #5
mikeytown2 commentedkeeping the code as is.