prevent error message in log when Enabled is not checked

This commit is contained in:
Isaac Connor 2015-02-06 14:15:26 -05:00
parent 856a8ce1d0
commit 4524a61a50
1 changed files with 1 additions and 2 deletions

View File

@ -260,8 +260,7 @@ if ( !empty($action) )
$monitor = dbFetchOne( "SELECT * FROM Monitors WHERE Id=?", NULL, array($mid) );
$newFunction = validStr($_REQUEST['newFunction']);
$newEnabled = validStr($_REQUEST['newEnabled']);
if ($newEnabled != "1") $newEnabled = "0";
$newEnabled = isset( $_REQUEST['newEnabled'] ) and $_REQUEST['newEnabled'] != "1" ? "0" : "1";
$oldFunction = $monitor['Function'];
$oldEnabled = $monitor['Enabled'];
if ( $newFunction != $oldFunction || $newEnabled != $oldEnabled )