summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards/openvpn_wizard.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2010-05-01 15:27:17 -0400
committerChris Buechler <cmb@pfsense.org>2010-05-01 15:27:17 -0400
commit4f529aa83a9ba03ac44fba6849be3e5929161946 (patch)
treeda335696bee14f271311f008ab44739eb9f1da86 /usr/local/www/wizards/openvpn_wizard.inc
parent77eddca8aeabefab83130ec073241a6018026410 (diff)
downloadpfsense-4f529aa83a9ba03ac44fba6849be3e5929161946.zip
pfsense-4f529aa83a9ba03ac44fba6849be3e5929161946.tar.gz
fix "Invalid argument supplied for foreach"
Diffstat (limited to 'usr/local/www/wizards/openvpn_wizard.inc')
-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