diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-04-28 17:54:56 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-04-28 17:54:56 -0400 |
commit | 80d5f15380948ebb279c434683495af7d7a477a9 (patch) | |
tree | fb59b9bb781ecd03c536e5803c6c54d0c14293b3 /config | |
parent | ac5c340c637be06f9dd1d9e2909e29f6acfb19d5 (diff) | |
download | pfsense-packages-80d5f15380948ebb279c434683495af7d7a477a9.tar.gz pfsense-packages-80d5f15380948ebb279c434683495af7d7a477a9.tar.bz2 pfsense-packages-80d5f15380948ebb279c434683495af7d7a477a9.zip |
Ensure item exists before calling foreach on it
Diffstat (limited to 'config')
-rw-r--r-- | config/varnish64/varnish.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index 9ebc7e04..1a96962e 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -89,9 +89,10 @@ function is_varnish_backend_in_use($backendname) { global $config, $g; if($config['installedpackages']['varnishlbdirectors']['config'] != "") foreach($config['installedpackages']['varnishlbdirectors']['config'] as $url) - foreach($url['row'] as $urlmapping) - if($urlmapping['backendname'] == $backendname) - return true; + if($url['row']) + foreach($url['row'] as $urlmapping) + if($urlmapping['backendname'] == $backendname) + return true; if($config['installedpackages']['varnishbackends']['config'] != "") foreach($config['installedpackages']['varnishbackends']['config'] as $backend) if($backend['backendname'] == $backendname) |