aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)