Skip to content
Snippets Groups Projects
Commit 90ca93c9 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #322843 by Damien Tournoud: fixed --php option.

parent 66548610
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -229,14 +229,14 @@ function simpletest_script_init() {
$host = 'localhost';
$path = '';
// Determine location of php command automatically, unless a comamnd line argument is supplied.
if (isset($args['php'])) {
if (!empty($args['php'])) {
$php = $args['php'];
}
elseif (isset($_ENV['_'])) {
elseif (!empty($_ENV['_'])) {
// '_' is an environment variable set by the shell. It contains the command that was executed.
$php = $_ENV['_'];
}
elseif (isset($_ENV['SUDO_COMMAND'])) {
elseif (!empty($_ENV['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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment