From e7bdb83c4af7c0b529cb6bbf07998eb550360253 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 27 Nov 2008 23:33:00 +0000 Subject: [PATCH] Handle bad regexps --- status/edit_mon.cgi | 13 +++++-------- status/http-monitor.pl | 8 +++++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/status/edit_mon.cgi b/status/edit_mon.cgi index 8a4903c5b..e2cd5e4f6 100755 --- a/status/edit_mon.cgi +++ b/status/edit_mon.cgi @@ -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 "

\n"; - print &ui_table_start($text{'mon_header3'}, "width=100%", 4, - \@tds); - print $html; - print &ui_table_end(); - } + print "

\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 diff --git a/status/http-monitor.pl b/status/http-monitor.pl index 28f61ef83..94a84721a 100644 --- a/status/http-monitor.pl +++ b/status/http-monitor.pl @@ -44,9 +44,11 @@ eval { } eval { # Check for regexp match - if ($data !~ /$re/i) { - $up = 0; - } + eval { + if ($data !~ /$re/i) { + $up = 0; + } + }; }; }