Handle bad regexps
authorJamie Cameron <jcameron@webmin.com>
Thu, 27 Nov 2008 23:33:00 +0000 (23:33 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 27 Nov 2008 23:33:00 +0000 (23:33 +0000)
status/edit_mon.cgi
status/http-monitor.pl

index 8a4903c..e2cd5e4 100755 (executable)
@@ -219,14 +219,11 @@ if ($type =~ /^(\S+)::(\S+)$/) {
        # From another module
        ($mod, $mtype) = ($1, $2);
        &foreign_require($mod, "status_monitor.pl");
-       $html = &foreign_call($mod, "status_monitor_dialog", $mtype, $serv);
-       if ($html) {
-               print "<p>\n";
-               print &ui_table_start($text{'mon_header3'}, "width=100%", 4,
-                                     \@tds);
-               print $html;
-               print &ui_table_end();
-               }
+       print "<p>\n";
+       print &ui_table_start($text{'mon_header3'}, "width=100%", 4,
+                             \@tds);
+       print &foreign_call($mod, "status_monitor_dialog", $mtype, $serv);
+       print &ui_table_end();
        }
 else {
        # From this module
index 28f61ef..94a8472 100644 (file)
@@ -44,9 +44,11 @@ eval {
                        }
                eval {
                        # Check for regexp match
-                       if ($data !~ /$re/i) {
-                               $up = 0;
-                               }
+                       eval {
+                               if ($data !~ /$re/i) {
+                                       $up = 0;
+                                       }
+                               };
                        };
                }