Performance backup garbage collection potentially tries to delete same file multiple times

A cleaning task of backup.inc.php reads the file contents of a domains backup directory.

Those get compared against web_backup database table.

Backup filenames that should exist are read from web_backup table.

If there are duplicates in that table, the temp array of files to delete will have them, too ( no SELECT DISTINCT filename).

The author wanted to remove those duplicates using array_unique.

It never effectively was used, as this function does not receive the value by ref but returns a new value.

This code will take the return value and use it in the comming loop which does the actual deletion.

Rare case, keeping old code does not harm.

Merge request reports

Loading