on devel update:

* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html/drupal/update.php on line 174.
* warning: Invalid argument supplied for foreach() in /var/www/html/drupal/update.php on line 339.

Comments

moshe weitzman’s picture

Status: Active » Fixed
dejamuse’s picture

Version: 6.x-1.2 » 6.x-1.3

I received the same two error messages (that were supposedly fixed in 1.3) - when upgrading from 1.2 to 1.3:

Message	Invalid argument supplied for foreach() in /usr/local/www/apache22/drupal6/update.php on line 339.

array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /usr/local/www/apache22/drupal6/update.php on line 174.

Not sure if this is ok, but I ran the update.php script a 2nd time and there were no errors. I've read you're not supposed to run the update more than once, though they don't say exactly what happens if you do - just that is creates some errors, or something.

I disabled the devel module before updating, but I did not uninstall it.

dejamuse’s picture

Never mind, just caught the new 1.4 and no problems.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

chrisfromredfin’s picture

Version: 6.x-1.3 » 6.x-1.21
Status: Closed (fixed) » Active

Pardon me for re-opening this, if you'd rather I file new I will, but this so perfectly describes my issue. I've been applying the security update for devel today, jumping from 1.18 to 1.21 using drush. On two sites, I get these same errors (except different line number, off by one, for the second one) when I run update.php:

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html/update.php on line 174.
warning: Invalid argument supplied for foreach() in /var/www/html/update.php on line 338.

...and the devel update 6003 says "no queries."

mollyavalon’s picture

Me too.

moshe weitzman’s picture

Status: Active » Fixed

added return array() for that function in d6. thanks.

espirates’s picture

same thing just happen to me in updating

mos2710’s picture

It just happened to me as well.

chrisfromredfin’s picture

FYI the commit went into the -dev branch, so best to update to that so you (a) don't get the error but (b) still get the security fix.

roball’s picture

Got the same on updating from 1.20 to 1.21. I assume this warning is harmless and can simply be ignored.

TonyT’s picture

Status: Fixed » Needs review

I get the same errors when updating from 1.20 to 1.21. The problem seems to be that there is a line missing in devel/devel.install line 183 (in function devel_update_6003). It needs a "return array();" inserted so that the return result is an array which is what is expected by the update.php line that is giving the first error.

moshe weitzman’s picture

Status: Needs review » Fixed

this bug was fixed after 6.x-1.21. it will be in 6.x-1.22

lyricnz’s picture

To everyone who keeps reopening this - the problem was caused by the update between devel versions not returning a set of status messages - and is harmless and can be ignored.

_vid’s picture

Thanks lyricnz

Status: Fixed » Closed (fixed)

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