diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 9a7e6d4466b..1f01f608fb0 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1813,7 +1813,7 @@ class Adherent extends CommonObject if (!$error) { // Create payment line for invoice $paiement_id = $paiement->create($user); - if (!$paiement_id > 0) { + if (!($paiement_id > 0)) { $this->error = $paiement->error; $this->errors = $paiement->errors; $error++; diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 5567e741272..6e0a6e9085f 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -66,7 +66,7 @@ if (preg_match('/set_(.*)/', $action, $reg)) { $value = (GETPOST($code) ? GETPOST($code) : 1); $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; $errors[] = $db->lasterror(); } @@ -86,7 +86,7 @@ if (preg_match('/set_(.*)/', $action, $reg)) { $code = $reg[1]; $res = dolibarr_del_const($db, $code, $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; $errors[] = $db->lasterror(); } diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index a2db7bf8fcf..31d0776da6b 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -142,7 +142,7 @@ if ($action == 'updateMask') { $value = GETPOST('activate_hideClosedServiceByDefault', 'alpha'); $res3 = dolibarr_set_const($db, "CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT", $value, 'chaine', 0, '', $conf->entity); - if (!$res1 > 0 || !$res2 > 0 || !$res3 > 0) { + if (!($res1 > 0) || !($res2 > 0) || !($res3 > 0)) { $error++; } diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index e662c0576a2..c002c9059d7 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -59,12 +59,12 @@ if ($action == 'set') { if (!$error) { $res1 = dolibarr_set_const($db, "GEOIP_VERSION", GETPOST('geoipversion', 'aZ09'), 'chaine', 0, '', $conf->entity); - if (!$res1 > 0) { + if (!($res1 > 0)) { $error++; } $res2 = dolibarr_set_const($db, "GEOIPMAXMIND_COUNTRY_DATAFILE", $gimcdf, 'chaine', 0, '', $conf->entity); - if (!$res2 > 0) { + if (!($res2 > 0)) { $error++; } diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index c3c58984dc0..5902402674d 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -141,7 +141,7 @@ if ($action == 'updateMask') { $draft = GETPOST('HOLIDAY_DRAFT_WATERMARK', 'alpha'); $res2 = dolibarr_set_const($db, "HOLIDAY_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); - if (!$res1 > 0 || !$res2 > 0) { + if (!($res1 > 0) || !($res2 > 0)) { $error++; } diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index b2830f95743..2a5f74eabd6 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -77,7 +77,7 @@ if ($action == 'setconst' && $user->admin) { $constnote = dol_escape_htmltag($setupconst['note']); $result = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } } @@ -96,7 +96,7 @@ if ($action == 'setvalue' && $user->admin) { $db->begin(); $result = dolibarr_set_const($db, $varname, $value, 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php index 0e504ec26f1..099312ef491 100644 --- a/htdocs/admin/stocktransfer.php +++ b/htdocs/admin/stocktransfer.php @@ -78,9 +78,10 @@ if ($action == 'updateMask') { $maskconststocktransfer = GETPOST('maskconststocktransfer', 'alpha'); $maskstocktransfer = GETPOST('maskStockTransfer', 'alpha'); - if ($maskconststocktransfer) $res = dolibarr_set_const($db, $maskconststocktransfer, $maskstocktransfer, 'chaine', 0, '', $conf->entity); - - if (!$res > 0) $error++; + if ($maskconststocktransfer) { + $res = dolibarr_set_const($db, $maskconststocktransfer, $maskstocktransfer, 'chaine', 0, '', $conf->entity); + if ($res <= 0) $error++; + } if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index fba2d05897c..70f1959ab54 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -357,7 +357,7 @@ if (GETPOST('save') && !$cancel && !empty($user->rights->banque->modifier)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); } - if (!$bankaccountid > 0) { + if (!($bankaccountid > 0)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 6cc3496ced0..0bb69c444ba 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -192,7 +192,7 @@ if ($action == 'add' && $user->rights->tax->charges->creer) { } elseif (!$dateperiod) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'create'; - } elseif (!$actioncode > 0) { + } elseif (!($actioncode > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); $action = 'create'; } elseif (empty($amount)) { diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 921cc36e807..3d7d1d38b9a 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -375,7 +375,7 @@ if (empty($reshook)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) { + if (!($result > 0)) { $errors[] = "ErrorFailedToSaveFile"; } else { $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index ce47cc3568f..7b29159b227 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -77,7 +77,7 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call $ecmdir = new EcmDirectory($db); if ($section > 0) { $result = $ecmdir->fetch($section); - if (!$result > 0) { + if (!($result > 0)) { //dol_print_error($db,$ecmdir->error); //exit; } @@ -90,7 +90,7 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call $relativepath = ''; if ($section > 0) { $result = $ecmdir->fetch($section); - if (!$result > 0) { + if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9ba4ccc7f19..688cfa0ef6c 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1805,7 +1805,7 @@ class FormFile } } - if (!$found > 0 || !is_object($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) { + if ($found <= 0 || !is_object($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) { continue; // We do not show orphelins files } diff --git a/htdocs/datapolicy/admin/setupmail.php b/htdocs/datapolicy/admin/setupmail.php index 535c4383d0d..e2f562ee79b 100644 --- a/htdocs/datapolicy/admin/setupmail.php +++ b/htdocs/datapolicy/admin/setupmail.php @@ -63,7 +63,7 @@ if ($action == 'setvalue' && $user->admin) { $result = dolibarr_set_const($db, $sub, GETPOST($sub), 'chaine', 0, '', $conf->entity); $sub = "DATAPOLICIESREFUSE_".$l; $result = dolibarr_set_const($db, $sub, GETPOST($sub), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } if (!$error) { diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index 6cc37303346..80ef94e6213 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -111,7 +111,7 @@ if ($action == 'add_payment') { if (!$error) { $result = $payment->addPaymentToBank($user, 'payment_donation', '(DonationPayment)', GETPOST('accountid', 'int'), '', ''); - if (!$result > 0) { + if (!($result > 0)) { $errmsg = $payment->error; setEventMessages($errmsg, null, 'errors'); $error++; diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index d7de6acc727..c6f97adb6ba 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -85,7 +85,7 @@ if (!$sortfield) { $ecmdir = new EcmDirectory($db); if (!empty($section)) { $result = $ecmdir->fetch($section); - if (!$result > 0) { + if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index c44fab4702e..624f8d6ddf0 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -76,7 +76,7 @@ if (!$urlfile) { // Load ecm object $ecmdir = new EcmDirectory($db); $result = $ecmdir->fetch(GETPOST("section", 'alpha')); -if (!$result > 0) { +if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/ecm/file_note.php b/htdocs/ecm/file_note.php index 41367cf2894..53b120d3191 100644 --- a/htdocs/ecm/file_note.php +++ b/htdocs/ecm/file_note.php @@ -80,7 +80,7 @@ if (!$urlfile) { // Load ecm object $ecmdir = new EcmDirectory($db); $result = $ecmdir->fetch(GETPOST("section", 'alpha')); -if (!$result > 0) { +if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 11ac3bf95c1..aec4b54bc6c 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -64,7 +64,7 @@ if (!$sortfield) { $ecmdir = new EcmDirectory($db); if ($section > 0) { $result = $ecmdir->fetch($section); - if (!$result > 0) { + if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 1fcdac35b0f..90ce79be330 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -74,7 +74,7 @@ if ($module == 'invoice_supplier' && $sortfield == "fullname") { $ecmdir = new EcmDirectory($db); if ($section) { $result = $ecmdir->fetch($section); - if (!$result > 0) { + if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index 27a76d2ae6e..f348e0835e7 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -78,7 +78,7 @@ if (!$sortfield) { $ecmdir = new EcmDirectory($db); if (!empty($section)) { $result = $ecmdir->fetch($section); - if (!$result > 0) { + if (!($result > 0)) { dol_print_error($db, $ecmdir->error); exit; } diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 1c2cead08ea..3676f663ce8 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -134,7 +134,7 @@ if ($action == 'add_payment') { $payment->fetch($paymentid); if ($expensereport->total_ttc - $payment->amount == 0) { $result = $expensereport->setPaid($expensereport->id, $user); - if (!$result > 0) { + if (!($result > 0)) { setEventMessages($payment->error, $payment->errors, 'errors'); $error++; } diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 993d772a641..0e551d4e16d 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -92,8 +92,8 @@ if ($socid > 0) { print '
'.print_r($setupconst, true).''; $result = dolibarr_set_const($db, $setupconst['varname'], $setupconst['value'], 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } } @@ -89,7 +89,7 @@ if ($action == 'setvalue' && $user->admin) { $db->begin(); $result = dolibarr_set_const($db, $varname, $value, 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 24f515fa0bc..bf43c2d0048 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -36,6 +36,9 @@ if (!$user->admin || (empty($conf->productbatch->enabled))) $action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); +$error = 0; + + /* * Actions */ @@ -46,9 +49,10 @@ if ($action == 'updateMaskLot') { $maskconstbatch = GETPOST('maskconstLot', 'alpha'); $maskbatch = GETPOST('maskLot', 'alpha'); - if ($maskconstbatch) $res = dolibarr_set_const($db, $maskconstbatch, $maskbatch, 'chaine', 0, '', $conf->entity); - - if (!$res > 0) $error++; + if ($maskconstbatch) { + $res = dolibarr_set_const($db, $maskconstbatch, $maskbatch, 'chaine', 0, '', $conf->entity); + if ($res <= 0) $error++; + } if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -59,9 +63,10 @@ if ($action == 'updateMaskLot') { $maskconstbatch = GETPOST('maskconstSN', 'alpha'); $maskbatch = GETPOST('maskSN', 'alpha'); - if ($maskconstbatch) $res = dolibarr_set_const($db, $maskconstbatch, $maskbatch, 'chaine', 0, '', $conf->entity); - - if (!$res > 0) $error++; + if ($maskconstbatch) { + $res = dolibarr_set_const($db, $maskconstbatch, $maskbatch, 'chaine', 0, '', $conf->entity); + if ($res <= 0) $error++; + } if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index d7830d49615..32c95537947 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -109,7 +109,7 @@ $arrayfields = array( 'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(!empty($conf->productbatch->enabled))), 'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), 'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'e.ref'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(!$id > 0)), // If we are on specific warehouse, we hide it + 'e.ref'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(!($id > 0))), // If we are on specific warehouse, we hide it 'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0), 'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1), 'm.label'=>array('label'=>$langs->trans("MovementLabel"), 'checked'=>1), diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index ab3afad20b0..b32cfa5d0b2 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -128,7 +128,7 @@ $arrayfields = array( 'm.batch'=>array('label'=>"BatchNumberShort", 'checked'=>1, 'position'=>8, 'enabled'=>(!empty($conf->productbatch->enabled))), 'pl.eatby'=>array('label'=>"EatByDate", 'checked'=>0, 'position'=>9, 'enabled'=>(!empty($conf->productbatch->enabled))), 'pl.sellby'=>array('label'=>"SellByDate", 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))), - 'e.ref'=>array('label'=>"Warehouse", 'checked'=>1, 'position'=>100, 'enabled'=>(!$id > 0)), // If we are on specific warehouse, we hide it + 'e.ref'=>array('label'=>"Warehouse", 'checked'=>1, 'position'=>100, 'enabled'=>(!($id > 0))), // If we are on specific warehouse, we hide it 'm.fk_user_author'=>array('label'=>"Author", 'checked'=>0, 'position'=>120), 'm.inventorycode'=>array('label'=>"InventoryCodeShort", 'checked'=>1, 'position'=>130), 'm.label'=>array('label'=>"MovementLabel", 'checked'=>1, 'position'=>140), diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index fe8bd1bea38..2245392f7ca 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -647,7 +647,7 @@ if (empty($reshook)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) { + if (!($result > 0)) { $errors[] = "ErrorFailedToSaveFile"; } else { // Create thumbs @@ -813,7 +813,7 @@ if (empty($reshook)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) { + if (!($result > 0)) { $errors[] = "ErrorFailedToSaveFile"; } else { // Create thumbs @@ -1143,7 +1143,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) { + if (!($result > 0)) { $errors[] = "ErrorFailedToSaveFile"; } else { // Create thumbs diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index d13893ca7dd..624dcda170a 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2289,7 +2289,7 @@ class Societe extends CommonObject $desc = trim($desc); // Check parameters - if (!$remise > 0) { + if (!($remise > 0)) { $this->error = $langs->trans("ErrorWrongValueForParameter", "1"); return -1; } diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index e3befa94108..dd8b875a0a0 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -56,72 +56,72 @@ if ($action == 'setvalue' && $user->admin) { if (empty($conf->stripeconnect->enabled)) { $result = dolibarr_set_const($db, "STRIPE_TEST_PUBLISHABLE_KEY", GETPOST('STRIPE_TEST_PUBLISHABLE_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_TEST_SECRET_KEY", GETPOST('STRIPE_TEST_SECRET_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_TEST_WEBHOOK_ID", GETPOST('STRIPE_TEST_WEBHOOK_ID', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_TEST_WEBHOOK_KEY", GETPOST('STRIPE_TEST_WEBHOOK_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_PUBLISHABLE_KEY", GETPOST('STRIPE_LIVE_PUBLISHABLE_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_SECRET_KEY", GETPOST('STRIPE_LIVE_SECRET_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_WEBHOOK_ID", GETPOST('STRIPE_LIVE_WEBHOOK_ID', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_LIVE_WEBHOOK_KEY", GETPOST('STRIPE_LIVE_WEBHOOK_KEY', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CREDITOR", GETPOST('ONLINE_PAYMENT_CREDITOR', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_PAYMENTS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_USER_ACCOUNT_FOR_ACTIONS", GETPOST('STRIPE_USER_ACCOUNT_FOR_ACTIONS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 'int'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_FORM", GETPOST('ONLINE_PAYMENT_MESSAGE_FORM', 'restricthtml'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_OK", GETPOST('ONLINE_PAYMENT_MESSAGE_OK', 'restricthtml'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_MESSAGE_KO", GETPOST('ONLINE_PAYMENT_MESSAGE_KO', 'restricthtml'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } $result = dolibarr_set_const($db, "ONLINE_PAYMENT_SENDEMAIL", GETPOST('ONLINE_PAYMENT_SENDEMAIL'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } // Stock decrement @@ -131,12 +131,12 @@ if ($action == 'setvalue' && $user->admin) { // Payment token for URL $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN", GETPOST('PAYMENT_SECURITY_TOKEN', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } if (empty($conf->use_javascript_ajax)) { $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN_UNIQUE", GETPOST('PAYMENT_SECURITY_TOKEN_UNIQUE', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) { + if (!($result > 0)) { $error++; } } diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 1ea4b88acdd..27d8e0d09da 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -120,7 +120,7 @@ if (empty($reshook)) { if (!$error) { $result = dol_set_user_param($db, $conf, $object, $tabparam); - if (!$result > 0) { + if (!($result > 0)) { $error++; } } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 6157ac765da..597390e9f49 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -572,7 +572,7 @@ if (empty($reshook)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']); - if (!$result > 0) { + if (!($result > 0)) { setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); } else { // Create thumbs