Skip to content

Commit a7dab54

Browse files
committed
Safe-load .env if existent to prevent Fatal error during site install.
1 parent eeea242 commit a7dab54

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

load.environment.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
*/
77

88
use Dotenv\Dotenv;
9-
use Dotenv\Exception\InvalidPathException;
109

1110
/**
1211
* Load any .env file. See /.env.example.
1312
*
14-
* Drupal has no official method for loading environment variables and uses
13+
* Drupal has no official method for loading environment variables and uses
1514
* getenv() in some places.
1615
*/
1716
$dotenv = Dotenv::createUnsafeImmutable(__DIR__);
18-
$dotenv->load();
17+
$dotenv->safeLoad();

0 commit comments

Comments
 (0)