Skip to content

Commit

Permalink
Fixed #15933
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Oct 21, 2024
1 parent 4ac1a6d commit 147c748
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Fixed a bug where admin table header cells weren’t indicating when they were sorted. ([#15897](https://github.com/craftcms/cms/issues/15897))
- Fixed an error that occurred when creating a database backup, if the System Name contained any quote-like characters. ([#15933](https://github.com/craftcms/cms/issues/15933))

## 4.12.7 - 2024-10-15

Expand Down
5 changes: 3 additions & 2 deletions src/db/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ public function close(): void
public function getBackupFilePath(): string
{
// Determine the backup file path
$systemName = mb_strtolower(FileHelper::sanitizeFilename(Craft::$app->getSystemName(), [
$systemName = FileHelper::sanitizeFilename(Craft::$app->getSystemName(), [
'asciiOnly' => true,
]));
]);
$systemName = str_replace(['\'', '"'], '', strtolower($systemName));
$version = Craft::$app->getInfo()->version ?? Craft::$app->getVersion();
$filename = ($systemName ? "$systemName--" : '') . gmdate('Y-m-d-His') . "--v$version";
$backupPath = Craft::$app->getPath()->getDbBackupPath();
Expand Down

0 comments on commit 147c748

Please sign in to comment.