summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-04-30 22:06:51 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2012-04-30 22:06:51 -0700
commit45589029ed1d4b424aeff60e87c112e586ececc2 (patch)
tree62e4bb8d614a10628e29427d110f126a40c345a6 /scripts
parent1ef0cd4e9cddb9541ecd2f2e2bb47b51c209b18a (diff)
downloadbrdo-45589029ed1d4b424aeff60e87c112e586ececc2.tar.gz
brdo-45589029ed1d4b424aeff60e87c112e586ececc2.tar.bz2
Issue #1477110 by msonnabaum, tim.plunkett: Fixed php path detection in run-tests.sh.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run-tests.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index cc09c7621..f651f22bb 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -253,14 +253,14 @@ function simpletest_script_init($server_software) {
if (!empty($args['php'])) {
$php = $args['php'];
}
- elseif (!empty($_ENV['_'])) {
+ elseif ($php_env = getenv('_')) {
// '_' is an environment variable set by the shell. It contains the command that was executed.
- $php = $_ENV['_'];
+ $php = $php_env;
}
- elseif (!empty($_ENV['SUDO_COMMAND'])) {
+ elseif ($sudo = getenv('SUDO_COMMAND')) {
// 'SUDO_COMMAND' is an environment variable set by the sudo program.
// Extract only the PHP interpreter, not the rest of the command.
- list($php, ) = explode(' ', $_ENV['SUDO_COMMAND'], 2);
+ list($php, ) = explode(' ', $sudo, 2);
}
else {
simpletest_script_print_error('Unable to automatically determine the path to the PHP interpreter. Supply the --php command line argument.');