Skip to content

Commit

Permalink
Update modules/system/console/WinterEnv.php
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeTowers authored Dec 4, 2024
1 parent 1fc1201 commit 9fee324
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/system/console/WinterEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ protected function updateEnvFile(): void

foreach ($dbConfig as $dbEnvKey => $dbConfigKey) {
$value = config(join('.', [$config, 'connections', $default, $dbConfigKey]));
// Fix for https://github.com/wintercms/winter/issues/1242#issuecomment-2515344385
if ($dbEnvKey === 'DB_DATABASE' && PHP_OS_FAMILY === 'Windows' && str_contains($value, '\\')) {
$value = str_replace('\\', '\\\\', $value);
}
Expand Down

0 comments on commit 9fee324

Please sign in to comment.