bug: CLI RestoreCommand passes wrong arguments to RestoreEngine #71

Closed
opened 2026-06-21 23:00:54 +00:00 by jmiller · 0 comments
Owner

Severity: CRITICAL

RestoreCommand at line 89 calls $engine->restore($record->absolute_path, $record->backup_type) — passing a string filepath as the int $recordId parameter and a backup type string as bool $restoreFiles. PHP coerces the filepath to int 0, the engine queries WHERE id = 0, finds nothing, and returns failure.

The CLI restore command is completely broken.

Fix

$result = $engine->restore($recordId);

File

  • plg_console_mokosuitebackup/src/Command/RestoreCommand.php:89
## Severity: CRITICAL `RestoreCommand` at line 89 calls `$engine->restore($record->absolute_path, $record->backup_type)` — passing a string filepath as the `int $recordId` parameter and a backup type string as `bool $restoreFiles`. PHP coerces the filepath to `int 0`, the engine queries `WHERE id = 0`, finds nothing, and returns failure. **The CLI restore command is completely broken.** ## Fix ```php $result = $engine->restore($recordId); ``` ## File - `plg_console_mokosuitebackup/src/Command/RestoreCommand.php:89`
jmiller added the component: engine label 2026-06-21 23:00:54 +00:00
Sign in to join this conversation.
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteBackup#71