r4320 bugfix: fexed undefined variable $error_message in renderDiscoveredNeighbors
authorAlexey Andriyanov <alan@al-an.info>
Fri, 11 Mar 2011 10:33:13 +0000 (10:33 +0000)
committerAlexey Andriyanov <alan@al-an.info>
Fri, 11 Mar 2011 10:33:13 +0000 (10:33 +0000)
wwwroot/inc/interface.php

index 167e815657e06580a359a219d3a1b599eaf018a5..b0a4959c5a0a90caf3a40914a6037172eab89a8a 100644 (file)
@@ -8827,7 +8827,7 @@ function renderDiscoveredNeighbors ($object_id)
                                $error_message = "Incompatible port types";
                        } while (FALSE); // do {
 
-                       $tr_class = $link_matches ? 'trok' : ($error_message ? 'trerror' : 'trwarning');
+                       $tr_class = $link_matches ? 'trok' : (isset ($error_message) ? 'trerror' : 'trwarning');
                        echo "<tr class=\"$tr_class\">";
                        if ($initial_row)
                        {
@@ -8849,7 +8849,7 @@ function renderDiscoveredNeighbors ($object_id)
                        echo "<td>" . ($portinfo_remote ? formatPortLink ($dp_remote_object_id, NULL, $portinfo_remote['id'], $portinfo_remote['name']) : $dp_neighbor['port'] ) . "</td>";
                        echo "<td>" . ($portinfo_remote ? formatPortIIFOIF($portinfo_remote) : '&nbsp') . "</td>";
                        echo "<td>";
-                       if ($error_message || $link_matches)
+                       if (isset ($error_message) || $link_matches)
                                echo '&nbsp;';
                        else
                        {
@@ -8860,7 +8860,7 @@ function renderDiscoveredNeighbors ($object_id)
                        }
                        echo "</td>";
                                
-                       if ($error_message)
+                       if (isset ($error_message))
                                echo "<td style=\"background-color: white; border-top: none\">$error_message</td>";
                        echo "</tr>";
                }