Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit b02d42f

Browse files
committed
Fix bug with where the env is set for the database.
1 parent f8470d3 commit b02d42f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

platformsh-flex-env.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function mapPlatformShEnvironment() : void
1414
{
1515

1616
$dbRelationshipName = 'database';
17-
1817
// Set the DATABASE_URL for Doctrine, if necessary.
1918
if (!getenv('DATABASE_URL')) {
2019
# "mysql://[email protected]:3306/symfony?charset=utf8mb4&serverVersion=5.7";
@@ -27,9 +26,9 @@ function mapPlatformShEnvironment() : void
2726
$endpoint['scheme'], $endpoint['username'], $endpoint['password'],
2827
$endpoint['host'], $endpoint['port'],
2928
$endpoint['path']);
29+
putenv('DATABASE_URL=' . $dbUrl);
3030
break;
3131
}
32-
putenv('DATABASE_URL=' . $dbUrl);
3332
}
3433
}
3534
else {

0 commit comments

Comments
 (0)