mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
- Allow to load multipe extensions via -d
This commit is contained in:
parent
a2642ff434
commit
cd91af2f7f
@ -1748,7 +1748,14 @@ function settings2array($settings, &$ini_settings)
|
||||
$setting = explode("=", $setting, 2);
|
||||
$name = trim(strtolower($setting[0]));
|
||||
$value = trim($setting[1]);
|
||||
$ini_settings[$name] = $value;
|
||||
if ($name == 'extension') {
|
||||
if (!isset($ini_settings[$name])) {
|
||||
$ini_settings[$name] = array();
|
||||
}
|
||||
$ini_settings[$name][] = $value;
|
||||
} else {
|
||||
$ini_settings[$name] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1757,8 +1764,15 @@ function settings2params(&$ini_settings)
|
||||
{
|
||||
$settings = '';
|
||||
foreach($ini_settings as $name => $value) {
|
||||
$value = addslashes($value);
|
||||
$settings .= " -d \"$name=$value\"";
|
||||
if (is_array($value)) {
|
||||
foreach($value as $val) {
|
||||
$val = addslashes($val);
|
||||
$settings .= " -d \"$name=$val\"";
|
||||
}
|
||||
} else {
|
||||
$value = addslashes($value);
|
||||
$settings .= " -d \"$name=$value\"";
|
||||
}
|
||||
}
|
||||
$ini_settings = $settings;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user