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

beginner - July 17, 2007 - 04:36

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

hallman - July 17, 2007 - 18:11

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

greg_y - July 27, 2007 - 07:28

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

beginner - July 27, 2007 - 08:47
Status:active» needs review

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.)

AttachmentSize
update.warning.patch 691 bytes

#5

cojones - July 27, 2007 - 17:42

I had the same error during update.php, applied your patch and rerun and I do not get any errors now.

#6

greg_y - July 28, 2007 - 00:25

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

beginner - August 7, 2007 - 13:19
Assigned to:Anonymous» beginner
Status:needs review» fixed

@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

Anonymous - August 21, 2007 - 13:48
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.