diff --git a/web/zm_html_view_monitor.php b/web/zm_html_view_monitor.php index 047c4b0d4..bd8893103 100644 --- a/web/zm_html_view_monitor.php +++ b/web/zm_html_view_monitor.php @@ -30,10 +30,12 @@ $result = mysql_query( "select * from TriggersX10 where MonitorId = '$mid'" ); if ( !$result ) die( mysql_error() ); - $x10_monitor = mysql_fetch_assoc( $result ); - foreach( $x10_monitor as $key=>$value ) + if ( $x10_monitor = mysql_fetch_assoc( $result ) ) { - $monitor['X10'.$key] = $value; + foreach( $x10_monitor as $key=>$value ) + { + $monitor['X10'.$key] = $value; + } } } } @@ -144,6 +146,7 @@ function closeWindow() } ?> +