What happened?
Description
The glob pattern to grab the existing backups is invalid on lines 301 and 302 in src/db/Connection.php. The problem is that it contains 2 periods since $this->_getDumpExtension() also starts with a period. This results in [PROJECT]/storage/backups/*..sql and [PROJECT]/storage/backups/*..sql.zip by default.
Expected behavior
The set number of backups based on maxBackups should be respected and older backups should be deleted.
Actual behavior
No database backups are removed since $files is always an empty array due to the invalid glob pattern.
Craft CMS version
4.10.4
PHP version
8.3.11
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
The glob pattern to grab the existing backups is invalid on lines 301 and 302 in
src/db/Connection.php. The problem is that it contains 2 periods since$this->_getDumpExtension()also starts with a period. This results in[PROJECT]/storage/backups/*..sqland[PROJECT]/storage/backups/*..sql.zipby default.Expected behavior
The set number of backups based on
maxBackupsshould be respected and older backups should be deleted.Actual behavior
No database backups are removed since
$filesis always an empty array due to the invalid glob pattern.Craft CMS version
4.10.4
PHP version
8.3.11
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions