Line 198 of menu_block.module is:

while ($item = db_fetch_array($result)) {

But is should be:

foreach ($result as $item) {

Comments

Chris Gillis’s picture

Priority: Normal » Major

Then 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)

temicxoch’s picture

Many 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! :-\

himerus’s picture

Status: Needs review » Reviewed & tested by the community

The options in 1 do in fact fix this. Please apply and release a new beta version.

JohnAlbin’s picture

Title: Undefined Function db_fetch_array in D7 » Undefined function db_fetch_array
Version: 7.x-2.0-beta2 » 7.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

Thanks, Chris Gillis. Although, a patch would have made it a bit easier. :-)

JohnAlbin’s picture

Bah. And this is why it should be in patch form. I missed part of your changes. New release forthcoming.

Chris Gillis’s picture

I 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. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.