Skip to content

Commit

Permalink
Do not redefine WP_ENV if already set via environment var
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrjones committed May 31, 2018
1 parent 322ec39 commit 8363f92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-config.load.php
Expand Up @@ -22,7 +22,7 @@ function s24_load_environment_config() {
}

// Set env via --env=<environment> argument if running via WP-CLI
if (PHP_SAPI == "cli" && defined('WP_CLI_ROOT')) {
if (!defined('WP_ENV') && PHP_SAPI == "cli" && defined('WP_CLI_ROOT')) {
foreach ($argv as $arg) {
if (preg_match('/--env=(.+)/', $arg, $m)) {
define('WP_ENV', $m[1]);
Expand Down

0 comments on commit 8363f92

Please sign in to comment.