backdrop-contrib / backup_migrate

Port of the Drupal backup_migrate module to Backdrop
GNU General Public License v2.0
7 stars 14 forks source link

Notice: Undefined variable: v_version in Archive_Tar->_writeLongHeader() (line 1678 of /Applications/MAMP/htdocs/rc-1b/core/modules/system/system.tar.inc). #75

Closed abetomas closed 1 year ago

abetomas commented 2 years ago

I got this message when backing up entire site: Notice: Undefined variable: v_version in Archive_Tar->_writeLongHeader() (line 1678 of /Applications/MAMP/htdocs/rc-1b/core/modules/system/system.tar.inc). However, (a) the backup files were actually generated in the Manual Directory, (b) the messages were not flagged as errors in the log messages report! ???

Screen Shot 2022-07-22 at 12 17 56 AM
quackers8me commented 2 years ago

@abetomas Which version of PHP are you running? I found the following post on the Drupal issue queue: https://www.drupal.org/project/backup_migrate/issues/3265002

abetomas commented 2 years ago

@abetomas Which version of PHP are you running? I found the following post on the Drupal issue queue: https://www.drupal.org/project/backup_migrate/issues/3265002

Thanks for your response. The MAMP PHP version was 5.6.40, I changed the version to PHP version 7.4.21 and the same messages were displayed. However, the backup files were also created.

Screen Shot 2022-08-14 at 11 41 39 PM
indigoxela commented 2 years ago

Can you give us a little more info about your whole local dev setup? (Obviously this is a local install.)

abetomas commented 2 years ago

Can you give us a little more info about your whole local dev setup? (Obviously this is a local install.)

Thank you for your response. My local dev setup:

Please let me know if you need more info. Thanks again.

argiepiano commented 1 year ago

This seems like an oversight when writing the method _writeLongHeader(). If you check _writeHeader() and _writeHeaderBlock(), both define $v_version and $v_magic. However, _writeLongHeader() doesn't - thus the notice. The fix is pretty simple - just define the variables.

Oh, and this is a core bug, BTW!

argiepiano commented 1 year ago

Core PR submitted https://github.com/backdrop/backdrop/pull/4441

This was previously reported here https://github.com/backdrop/backdrop-issues/issues/3492