diff options
-rw-r--r-- | usr/local/www/wizards/openvpn_wizard.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index a452152..6fe2a41 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -172,10 +172,12 @@ function step7_submitphpaction() { $canames = array(); $cacns = array(); - foreach($config['system']['ca'] as $ca) { - $canames[] = $ca['name']; - $cainfo = cert_get_subject_hash($ca['crt']); - $cacns[] = $cainfo["CN"]; + if (is_array($config['system']['ca'])) { + foreach($config['system']['ca'] as $ca) { + $canames[] = $ca['name']; + $cainfo = cert_get_subject_hash($ca['crt']); + $cacns[] = $cainfo["CN"]; + } } if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) || |