Skip to content

Commit

Permalink
Merge pull request #9595 from totten/master-extbatch-env
Browse files Browse the repository at this point in the history
Civi\API\ExternalBatch - Verify that $_ENV is working
  • Loading branch information
colemanw authored Jan 11, 2017
2 parents cdedc5f + 47566c4 commit 999b8fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Civi/API/ExternalBatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public function __construct($defaultParams = array()) {
$this->settingsPath = defined('CIVICRM_SETTINGS_PATH') ? CIVICRM_SETTINGS_PATH : NULL;
$this->defaultParams = $defaultParams;
$this->env = $_ENV;
if (empty($_ENV)) {
// FIXME: If we upgrade to newer Symfony\Process and use the newer
// inheritEnv feature, then this becomes unnecessary.
throw new \CRM_Core_Exception('ExternalBatch cannot detect environment: $_ENV is missing. (Tip: Set variables_order=EGPCS in php.ini.)');
}
}

/**
Expand Down

0 comments on commit 999b8fd

Please sign in to comment.