r4221 bugfix: undefined variable $hl_port_name message was appearing
authorAlexey Andriyanov <alan@al-an.info>
Sun, 13 Feb 2011 14:55:39 +0000 (14:55 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Sun, 13 Feb 2011 14:55:39 +0000 (14:55 +0000)
renderObject8021QPorts: added check for defined before using the var
renderObject8021QSync: refactored check for unification

wwwroot/inc/interface.php

index 43275df..59f2448 100644 (file)
@@ -8135,7 +8135,7 @@ function renderObject8021QPorts ($object_id)
                }
                $ancor = '';
                $tdclass = '';
-               if ($hl_port_name == $port_name)
+               if (isset ($hl_port_name) and $hl_port_name == $port_name)
                {
                        $tdclass .= 'class="border_highlight"';
                        $ancor = "name='port-$hl_port_id'";
@@ -8818,7 +8818,7 @@ END
 
                $ancor = '';
                $td_class = '';
-               if (isset ($hl_port_id) && $hl_port_name == $port_name)
+               if (isset ($hl_port_name) and $hl_port_name == $port_name)
                {
                        $ancor = "name='port-$hl_port_id'";
                        $td_class = ' border_highlight';