aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/haproxy/haproxy_servers_edit.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/config/haproxy/haproxy_servers_edit.php b/config/haproxy/haproxy_servers_edit.php
index 5a37e7a2..5c747277 100755
--- a/config/haproxy/haproxy_servers_edit.php
+++ b/config/haproxy/haproxy_servers_edit.php
@@ -342,13 +342,15 @@ function clearcombo(){
function row_helper() {
global $pconfig, $a_backend;
$options = "";
- foreach ($a_backend as $backend) {
- $options .= "<option value='{$backend['name']}'";
- if($backend['name'] == $pconfig['backend'])
- $options .= "SELECTED";
- $options .= ">";
- $options .= $backend['name'];
- $options .= "</option>";
+ if($a_backend) {
+ foreach ($a_backend as $backend) {
+ $options .= "<option value='{$backend['name']}'";
+ if($backend['name'] == $pconfig['backend'])
+ $options .= "SELECTED";
+ $options .= ">";
+ $options .= $backend['name'];
+ $options .= "</option>";
+ }
}
echo <<<EOF