add parenthesis for safety

This commit is contained in:
Isaac Connor 2021-02-18 13:46:29 -05:00
parent a4d8ef5d8f
commit c99f43205d
1 changed files with 2 additions and 3 deletions

View File

@ -56,9 +56,9 @@ if ( $action == 'delete' ) {
} }
$changed = false; $changed = false;
while( $config = dbFetchNext($result) ) { while ($config = dbFetchNext($result)) {
unset($newValue); unset($newValue);
if ( $config['Type'] == 'boolean' && empty($_REQUEST['newConfig'][$config['Name']]) ) { if ( ($config['Type'] == 'boolean') and empty($_REQUEST['newConfig'][$config['Name']]) ) {
$newValue = 0; $newValue = 0;
} else if ( isset($_REQUEST['newConfig'][$config['Name']]) ) { } else if ( isset($_REQUEST['newConfig'][$config['Name']]) ) {
$newValue = preg_replace("/\r\n/", "\n", stripslashes($_REQUEST['newConfig'][$config['Name']])); $newValue = preg_replace("/\r\n/", "\n", stripslashes($_REQUEST['newConfig'][$config['Name']]));
@ -98,5 +98,4 @@ if ( $action == 'delete' ) {
} }
return; return;
} // end if object vs action } // end if object vs action
?> ?>