summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc10
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 9be787c..41189e1 100644
--- a/usr/local/www/wizards/openvpn_wizard.inc
+++ b/usr/local/www/wizards/openvpn_wizard.inc
@@ -271,10 +271,12 @@ function step9_submitphpaction() {
$certnames = array();
$certcns = array();
- foreach($config['system']['cert'] as $cert) {
- $certnames[] = $cert['name'];
- $certinfo = cert_get_subject_hash($cert['crt']);
- $certcns[] = $certinfo["CN"];
+ if (is_array($config['system']['cert'])) {
+ foreach($config['system']['cert'] as $cert) {
+ $certnames[] = $cert['name'];
+ $certinfo = cert_get_subject_hash($cert['crt']);
+ $certcns[] = $certinfo["CN"];
+ }
}
if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
OpenPOWER on IntegriCloud