I update from version 6.x-1.05 to 6.x-2.2. After I run update.php I get the following warnings:
* warning: array_merge(): Argument #2 is not an array in /srv/www/vhosts/euxinos.ro/httpdocs/update.php on line 174.
* warning: Invalid argument supplied for foreach() in /srv/www/vhosts/euxinos.ro/httpdocs/update.php on line 339.
The following queries were executed
dhtml_menu module
Update #6000
* DELETE FROM {blocks} WHERE module = 'dhtml_menu'
Update #6001
* No queries
Is it OK?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | dhtml_menu-update-return-284311-1.patch | 502 bytes | cburschka |
Comments
Comment #1
cburschkaArgh. This is a minor WTF of the database update API. Update functions HAVE to return an empty array, even if they executed no SQL queries at all.
This patch adds a return array() to the update function, which should remove the warning.
And as an answer, the update went fine and everything is okay. The warning was caused because the update system expected a status report about success/failure from the module, and didn't get one.
Comment #2
cburschkaDRUPAL-6--3 is fine. This is now committed for 6.x-2.x-dev.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
akwala commentedI just got this error in Drupal 6.8, when running update.php for the latest module updates for the following:
- Statistics Advanced Settings
- Bookmarks
The errors:
Comment #5
akwala commentedswitched status to active.
Comment #6
dave reidWell, I'm the module maintainer of statistics advanced settings and I double checked that all my module's update functions return an array. A quick check of the bookmarks module confirms there is an update function missing a return:
Comment #7
akwala commentedThx, Dave, for checking and reporting.
--aslam
Comment #8
Anonymous (not verified) commented6.x-1.6 resolves this issue.
Comment #9
akwala commentedI updated Bookmarks to 6.x-1.6. I didn't get the error, though there wasn't a db update associated with the 6.x-1.6 update. So, it would seem that the db update of 6.x-1.5 did succeed, despite the error/warning.