I've already tested this on three separate sites.

After adding an ftp destination, if the backup completes successfully, trying to visit the tab Saved Backups produces the following fatal error:

Fatal error: Call to a member function filepath() on a non-object in ../sites/all/modules/backup_migrate/includes/destinations.inc on line 886

After visiting the home page, another warning and an error appear:

Warning: fclose() expects parameter 1 to be resource, boolean given in drupal_ftp_ftp_to_file() (line 223 of .../public_html/sites/all/modules/backup_migrate/includes/destinations.ftp.inc).
FTP Error: Unable to download file: ./...mysql.zip.info from .

Deleting the .info file from the ftp server displays the Saved backup normally on the "Saved Backups" tab

Line 886 of the destinations.inc file is:

$info = drupal_parse_info_file($info_file->filepath());

Lines 220 to 223 of the destinations.ftp.inc file are:

  // We have changed into the directory, let's attempt to get the file
  $fp = @fopen($file, 'wb');
  $get_file = @ftp_fget($ftp->__conn, $fp, $filename, FTP_BINARY);
  fclose($fp);

I believe that @fopen returns FALSE and hence the error. I don't know what $file is supposed to be, but changing line 221 from

$fp = @fopen($file, 'wb');

to

$fp = @fopen($filename, 'wb');

seemed to be the trick. As this was done with very crude tests, I wouldn't suggest this as a solution.

Comments

gluer created an issue. See original summary.

couturier’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Active » Postponed (maintainer needs more info)

Updating the version. Can you confirm if this error still exists in the newest 7.x-3.2 release?

couturier’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing after more than two weeks with no activity.

BrankoC’s picture

I can confirm that this bug is still present in Backup and Migrate 7.x-3.10.

I ran across it while trying to fix bugs caused by changes in PHP as of PHP 8.

Since over the years so few people appear to have encountered this bug, there may be special conditions required to trigger it. My guess is it may have to do with me developing under MS Windows (10 Home) and running a FTP-server on that platform to test against.

I won't reopen because I am not sure fixing it won't do more damage than leaving it alone.