Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment | File | Size | Author |
---|
Comments
Comment #1
theemstra CreditAttribution: theemstra commentedNow 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
Comment #2
t3r0 CreditAttribution: t3r0 commentedThis 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.
Comment #3
theemstra CreditAttribution: theemstra commentedSorry, I don't have SSH access atm
Comment #4
t3r0 CreditAttribution: t3r0 commentedYou can download the latest version from http://drupal.org/node/239092
Comment #5
theemstra CreditAttribution: theemstra commentedTnx, problem is fixed by new version!
What was the problem? What is fixed?
Thom
Comment #6
kbahey CreditAttribution: kbahey commentedComment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
dredhorse CreditAttribution: dredhorse commentedSorry to open this again but I still have this issue even with the latest download from today 7th May 2008
Comment #9
theemstra CreditAttribution: theemstra commentedProblem seems to have returned with me as well on last update.
Comment #10
mhdg CreditAttribution: mhdg commentedI 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'
Comment #11
kbahey CreditAttribution: kbahey commentedThe 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?
Comment #12
Flying Drupalist CreditAttribution: Flying Drupalist commentedUsing the latest dev and error is still present.
Comment #13
mhdg CreditAttribution: mhdg commentedYou 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
Comment #14
jredding CreditAttribution: jredding commentedMoving over to appropriate project although error is not appearing on most recent download.
Comment #15
Nr. 18 CreditAttribution: Nr. 18 commentedshouldn'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.
Comment #16
sanday CreditAttribution: sanday commentedHi
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 .
Comment #17
theemstra CreditAttribution: theemstra commented4 years since last comment. closing this issue.
D6 is no longer supported.