Error messages generated by update.php when upgrading
hallman - July 16, 2007 - 15:46
| Project: | Notify |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | beginner |
| Status: | closed |
Description
I'm running Drupal 5.1 (v 1.173.2.3 2007/01/29 )
I was notified this morning of an updated version of notify. Downloaded and installed it (5.x-1.1 2007-Jul-15). Ran update.php and got the following two error message.
array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array in /home/drupal/public_html/update.php on line 309.
Invalid argument supplied for foreach() in /home/drupal/public_html/update.php on line 540.Judy Hallman

#1
Thanks for the report.
Are you sure it is related to notify?
At update.php?op=selection, have you checked which modules could have been updated at the same time?
There is an update function with the new release notify_update_2() but it doesn't return or manipulate any array.
I just tested on a site that had not used notify.module before. I installed 1.0, then upgraded to 1.1 as you did, but I didn't see any error.
I cannot reproduce.
#2
OK. Thanks for checking.
I'm quite sure I updated only notify. On the /update.php?op=selection page, I just click Update.
I've got the Update Status module and update when it tells me something is out of date. As best I can tell, notify was updated on the 15th and so I updated from the version just before it.
Notify seems to be working OK.
Judy Hallman
#3
Same issue. I updated several modules earlier this evening, ran update.php w/ no problems, realized I had forgotten to update notify, uploaded it + ran update.php, and got this:
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/18358/domains/lifetwo.com/html/production/update.php on line 309.* warning: Invalid argument supplied for foreach() in /home/18358/domains/lifetwo.com/html/production/update.php on line 540.
... so I'm sure it was a notify issue.
#4
Both of you: can you tell me what PHP version you are running?
Can you try to apply the following patch and run notify_update 2 again, and see if it solves your problem?
(it is safe to do so: update 2 clears the cache (which Drupal will rebuilt soon after) and sets an informative message.)
#5
I had the same error during update.php, applied your patch and rerun and I do not get any errors now.
#6
We're running php 5.2.2.
I don't have the tool to make a patched file, but I understand how to read it and do it manually. I'll try the patch over the weekend.
#7
@hallman: thanks for the report.
@cojones: thanks for testing the patch.
@greg_y: thanks for confirming the php version. It was indeed related. The problem doesn't exist with PHP4 which I am still using.
patch committed.
#8