From 5c4eeffbbb6d7e025f56417efe8a05ad1eb8d457 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 12 Oct 2005 20:41:01 +0000 Subject: Do not process items if it's not an array --- etc/inc/openvpn.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc/inc') diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 1036f31..2ba1068 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -89,6 +89,8 @@ function ovpn_unlink_tap() { function ovpn_config_server($reconfigure) { global $config, $g, $d_ovpnsrvdirty_path; + if(!is_array($config['ovpn']['server']['tunnel'])) + return; foreach ($config['ovpn']['server']['tunnel'] as $id => $server) { /* get tunnel interface */ $tun = $server['tun_iface']; -- cgit v1.1