Found a PHP error:

* warning: Invalid argument supplied for foreach() in *****/includes/menu.inc on line 258.
* warning: Invalid argument supplied for foreach() in *****/includes/menu.inc on line 258.

On Menu.inc at line 258 is text:

foreach ($data as $k => $v) {

2x the same bug.

Screenshot is included!

Thom

CommentFileSizeAuthor
Points | Gangas - Mozilla Firefox.png185.04 KBtheemstra
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

theemstra’s picture

Now i have:

* warning: Illegal offset type in isset or empty in /var/www/vhosts/gangas.nl/httpdocs/includes/path.inc on line 64.
* warning: Illegal offset type in /var/www/vhosts/gangas.nl/httpdocs/includes/path.inc on line 69.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/gangas.nl/httpdocs/includes/menu.inc on line 258.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/gangas.nl/httpdocs/includes/menu.inc on line 258.

Thom

t3r0’s picture

Status: Active » Postponed (maintainer needs more info)

This should be fixed in latest cvs version. See: #239290: Fix 6.x-1.x-dev some bugs

Can you checkout the latest cvs version and see if it fixes this issue.

theemstra’s picture

Sorry, I don't have SSH access atm

t3r0’s picture

You can download the latest version from http://drupal.org/node/239092

theemstra’s picture

Tnx, problem is fixed by new version!

What was the problem? What is fixed?

Thom

kbahey’s picture

Status: Postponed (maintainer needs more info) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

dredhorse’s picture

Status: Closed (fixed) » Active

Sorry to open this again but I still have this issue even with the latest download from today 7th May 2008

theemstra’s picture

Problem seems to have returned with me as well on last update.

mhdg’s picture

I had the same problem trying to automatically upgrade a module from 5.0 to 6.4

$items['admin/test_module'] = array(
'title' => 'Ogone',
'page callback' => 'drupal_get_form',
'page arguments' => array('test_module_admin'),
'access arguments' => array('Administer test_module settings'),
'type' => MENU_NORMAL_ITEM,
'description' => 'Configuration for test_module',
);

The reason is that you should use an array as parameter of 'page arguments'

kbahey’s picture

Status: Active » Postponed (maintainer needs more info)

The module already uses array() for page arguments.

So that is not the issue.

Has anyone tried a recent version and verify whether the problem has gone away?

Flying Drupalist’s picture

Using the latest dev and error is still present.

mhdg’s picture

You should check in every modules installed on your site that the arguments of 'page arguments' are allways 'array(...)'.

For instance, you could try this when in unix ('grep -R' is also possible but I began 'ls' on unix sytem V since the 70's):
cd sites/all/modules
find . -exec grep "page arguments" {} \;

or

find . -exec grep "page arguments" {} \; | grep -v array

Should you find something like : 'page arguments' => 'toto', that line should be fixed.

Note that other definition requesting an array as parameter should also be fixed, I am too novice in Drupal to enumerate them !

Regards

jredding’s picture

Project: User Points » User points Nodes and Comments
Component: Code: userpoints_basic » Code

Moving over to appropriate project although error is not appearing on most recent download.

Nr. 18’s picture

shouldn't menu.inc trow a better error message while this is occurring? It would help to speed up the development of (new) modules.

Or it could have a check when it is a string it could assume that it suppose to be a array with one value.

sanday’s picture

Hi
I know it's been a long time since last comment on this issue .
I had same problem lately but i get some kind of solution to get rid of stupid warring .
I do some dsm() on my $items array and delete undefined 'page arguments' and unuset items witch i don't use and then magically all warning goes away .

theemstra’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

4 years since last comment. closing this issue.
D6 is no longer supported.