Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Line 198 of menu_block.module is:
while ($item = db_fetch_array($result)) {
But is should be:
foreach ($result as $item) {
Comments
Comment #1
Chris Gillis CreditAttribution: Chris Gillis commentedThen of course line 200 should change to:
if (isset($menu_order[$item->menu_name])) {
and line 202 should change to:
$menu_order[$item->menu_name] = MENU_TREE__CURRENT_PAGE_MENU;
(using objects, not arrays)
Comment #2
temicxoch CreditAttribution: temicxoch commentedMany thanks! those line corrections seem to have solved this problem for me which I'd been trying unsuccessfully to fix with my very limited self-taught php understanding for a couple hours at least! :-\
Comment #3
himerus CreditAttribution: himerus commentedThe options in 1 do in fact fix this. Please apply and release a new beta version.
Comment #4
JohnAlbinThanks, Chris Gillis. Although, a patch would have made it a bit easier. :-)
Comment #5
JohnAlbinBah. And this is why it should be in patch form. I missed part of your changes. New release forthcoming.
Comment #6
Chris Gillis CreditAttribution: Chris Gillis commentedI apologize John Albin. I haven't yet learnt how to create a CVS patch. I tried using tortoise on windows to create a patch for views module (as per the handbook), but was roughly told that my patch was not valid for some reason to do with paths, and I should only use command line. If anyone knows a good GUI for making patches that are valid on D.O I would love to begin bugfixing in earnest for this great community.
Thanks for making the patch for me this time John. Appreciate it. :)