Handle bad regexps

This commit is contained in:
Jamie Cameron
2008-11-27 23:33:00 +00:00
parent 4e48f18a3d
commit e7bdb83c4a
2 changed files with 10 additions and 11 deletions

View File

@@ -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

View File

@@ -44,9 +44,11 @@ eval {
}
eval {
# Check for regexp match
if ($data !~ /$re/i) {
$up = 0;
}
eval {
if ($data !~ /$re/i) {
$up = 0;
}
};
};
}