From ef5bbbeba75f46903e2e69402983c556d2f9bffb Mon Sep 17 00:00:00 2001 From: Ludovic Poujol Date: Thu, 17 Feb 2022 10:40:00 +0100 Subject: [PATCH] Fix behaviour when there is only one php version closes #74 --- inc/accounts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/accounts.php b/inc/accounts.php index d84da98..95980ab 100644 --- a/inc/accounts.php +++ b/inc/accounts.php @@ -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'])); }