Re: Bug in Backups
Since you have pressed the upload button without selecting any flie to upload, the error arises. Hence change line 169 in admin/backups.php:
if (get_post('upload'))
to be:
if (get_post('upload') && isset($_FILES['uploadfile']) && array_key_exists('tmp_name', $_FILES['uploadfile']))
Re: Bug in Backups
No you are wrong, I am pressing upload button while selecting a .sql file to upload.
If I apply your suggestion, It only avoid error shown in post#1 but the file is still not uploaded.
You have to review the commit mentioned in post#1, Better give it a try to upload a .sql file to understand the bug.
Re: Bug in Backups
yes, you can't restore a backup right now there is an error when trying to upload the backup file.
to restore my backup i had to upload it using ftp then i could restore.
so the bug shows up when trying to upload your backup file.
Re: Bug in Backups
Yes, there is no file uploaded since the $_FILES is empty on upload. The $_REQUEST is like:
Array
(
[comments] =>
[comp] => no
[protect] => 1
[uploadfile] => frontac24_1_1_20171206_1551.sql
[upload] => Upload file
[_focus] => comments
[_modified] => 0
[_confirmed] =>
[_token] => pZNU0jkQsPSi05HaQyLGAQxx
[FA9d3e45269bea7dab23238a920d251e93] => 33ebcyesul0lgdnms17d8nna35
)
The $_POST array does not have the last element above.
The fix is to make the start_form a multipart one - it was inadvertently changed during the last commit to this file.
Change line 190 in admin/backups.php
start_form(false, true);
to be:
start_form(true, true);
Re: Bug in Backups
Committed to stable repo.
Joe