Skip to content

Commit a7d1718

Browse files
committed
Bootstrap - Allow CIVICRM_SETTINGS=Auto
1 parent 1f78640 commit a7d1718

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bootstrap.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
* type of CMS is being used.
6262
* (Default: NULL)
6363
* - env: string|NULL. The environment variable which may contain the path to
64-
* civicrm.settings.php. Set NULL to disable.
64+
* civicrm.settings.php (or the token "Auto"). Set NULL to disable environment-checking.
6565
* (Default: CIVICRM_SETTINGS)
6666
* - httpHost: string|NULL. For multisite, the HTTP hostname.
6767
* - prefetch: bool. Whether to load various caches.
@@ -324,7 +324,7 @@ public function getCivicrmSettingsPhp($options) {
324324
if (defined('CIVICRM_CONFDIR') && file_exists(CIVICRM_CONFDIR . '/civicrm.settings.php')) {
325325
$settings = CIVICRM_CONFDIR . '/civicrm.settings.php';
326326
}
327-
elseif (!empty($options['env']) && getenv($options['env']) && file_exists(getenv($options['env']))) {
327+
elseif (!empty($options['env']) && getenv($options['env']) && getenv($options['env']) !== 'Auto' && file_exists(getenv($options['env']))) {
328328
$settings = getenv($options['env']);
329329
}
330330
elseif (!empty($options['settingsFile']) && file_exists($options['settingsFile'])) {

0 commit comments

Comments
 (0)