Project:Backup and Migrate
Version:6.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I upgraded from 1.2 to 2.x dev. When I ran the update script I received the following error

warning: Invalid argument supplied for foreach() in C:\wamp\www\mysite\sites\all\modules\backup_migrate\includes\crud.inc on line 280.

What does this mean

Comments

#1

Status:active» postponed (maintainer needs more info)

It means for some reason the db schema was not properly installed before the install script attempted to set up the default profile with your old settings. I have been unable to reproduce this issue. Does the module work? If so you can probably safely ignore this.

#2

Version:6.x-2.x-dev» 6.x-2.1

The same thing happened with me when going from 6.x-1.2 to 6.x-2.1 on each of the 4 or 5 sites I was using it on. I found that it didn't show up when running update.php a second time, for what it's worth!

#3

The same to me. 6.x-1.2 to 6.x-2.1

#4

Same problem from 1.2 to 2.1

I've a backup of the before state - if anybody is interested.

Update results:
* warning: Invalid argument supplied for foreach() in /drupal1/sites/all/modules/backup_migrate/includes/crud.inc on line 280.
* warning: Invalid argument supplied for foreach() in /drupal1/sites/all/modules/backup_migrate/includes/crud.inc on line 280.

The following queries were executed
backup_migrate module
Update #2000
* No queries
Update #2001
* ALTER TABLE {backup_migrate_profiles} ADD `source_id` VARCHAR(32) NOT NULL DEFAULT 'db'
Update #2002
* No queries
Update #2003
* ALTER TABLE {backup_migrate_schedules} CHANGE `profile_id` `profile_id` VARCHAR(32) NOT NULL DEFAULT '0'
Update #2004
* ALTER TABLE {backup_migrate_destinations} CHANGE `destination_id` `destination_id` VARCHAR(32) NOT NULL DEFAULT '0'
* ALTER TABLE {backup_migrate_profiles} CHANGE `profile_id` `profile_id` VARCHAR(32) NOT NULL DEFAULT '0'
* ALTER TABLE {backup_migrate_schedules} CHANGE `schedule_id` `schedule_id` VARCHAR(32) NOT NULL DEFAULT '0'
Update #2005
* UPDATE {backup_migrate_profiles} SET source_id = 'db' WHERE source_id = 'db_url:default'
* UPDATE {backup_migrate_schedules} SET destination_id = 'db' WHERE destination_id = 'db_url:default'
* UPDATE {backup_migrate_profiles} SET source_id = REPLACE(source_id, 'db_url:', 'db:')
* UPDATE {backup_migrate_schedules} SET destination_id = REPLACE(destination_id, 'db_url:', 'db:')
* ALTER TABLE {backup_migrate_profiles} DROP source_id

#5

I have been unable to reproduce this issue so if you would be willing to share your before backup that would really help. Of course if you're not comfortable with that I totally understand. Contact me on my contact page if you're willing to trust me with your data.

To ease everybody's minds, I don't think this warning is a meaningful one. The absolute worse case scenario if the update fails is that you may lose some of your old Backup and Migrate settings. There should be no database corruption.

#6

Status:postponed (maintainer needs more info)» fixed

I've committed some code which will suppress these warnings so this should no longer be an issue. I'd still be interested in reproducing it if anybody has any info that would help me do so.

#7

These warning happened to me on 6 instances of updates from 6.x-1.2 to 6.x-2.1.

However these warning do not affect upgrade and 2.1 works perfectly, although I tested only the new feature FTP backup location.

Hiding these warning is fine from my point of view.

#8

I have an OpenAtrium installation where 6.x-1.2 is installed.

What should I look for before doing the update to 6.x-2.1? I'm almost pretty sure I will get the same warnings. :-)

#9

Status:fixed» closed (fixed)

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

nobody click here