Fix behaviour when there is only one php version

closes #74
This commit is contained in:
Ludovic Poujol 2022-02-17 10:40:00 +01:00
parent d6c39be117
commit ef5bbbeba7
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ function web_add($form, $admin_mail) {
}
}
if (array_key_exists('php_versions', $conf) && count($conf['php_versions']) > 1) {
if (array_key_exists('php_versions', $conf) && is_array($conf['php_versions'])) {
$exec_cmd .= sprintf(' -r %s', $conf['php_versions'][$form->getField('php_version')->getValue()]);
}
@ -347,7 +347,7 @@ if ($conf['bindadmin']) {
$form->addField('use_gmail_mxs', new CheckboxInputFormField("Utilisation des serveurs Gmail en MX ?", FALSE));
}
if (array_key_exists('php_versions', $conf) && count($conf['php_versions']) > 1) {
if (array_key_exists('php_versions', $conf) && is_array($conf['php_versions'])) {
$form->addField('php_version', new SelectFormField("Version de PHP", TRUE, $conf['php_versions']));
}