aboutsummaryrefslogtreecommitdiffstats
path: root/config/varnish64/varnish.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-04-28 17:54:56 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-04-28 17:54:56 -0400
commit80d5f15380948ebb279c434683495af7d7a477a9 (patch)
treefb59b9bb781ecd03c536e5803c6c54d0c14293b3 /config/varnish64/varnish.inc
parentac5c340c637be06f9dd1d9e2909e29f6acfb19d5 (diff)
downloadpfsense-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/varnish64/varnish.inc')
-rw-r--r--config/varnish64/varnish.inc7
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)