bug: CLI RestoreCommand passes wrong arguments to RestoreEngine #71
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: CRITICAL
RestoreCommandat line 89 calls$engine->restore($record->absolute_path, $record->backup_type)— passing a string filepath as theint $recordIdparameter and a backup type string asbool $restoreFiles. PHP coerces the filepath toint 0, the engine queriesWHERE id = 0, finds nothing, and returns failure.The CLI restore command is completely broken.
Fix
File
plg_console_mokosuitebackup/src/Command/RestoreCommand.php:89