forked from Wavyzz/dolibarr
Merge pull request #19154 from Hystepik/develop#3
Fix : fix php 8.0 warnings
This commit is contained in:
@@ -545,8 +545,8 @@ $formcompany = new FormCompany($db);
|
||||
|
||||
$countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
|
||||
|
||||
$objsoc = new Societe($db);
|
||||
if ($socid > 0) {
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($socid);
|
||||
}
|
||||
|
||||
|
||||
@@ -1005,6 +1005,7 @@ class Form
|
||||
$langs->load("dict");
|
||||
|
||||
$out = '';
|
||||
$moreattrib = '';
|
||||
$incotermArray = array();
|
||||
|
||||
$sql = "SELECT rowid, code";
|
||||
@@ -1444,7 +1445,7 @@ class Form
|
||||
$label .= ' ('.$obj->name_alias.')';
|
||||
}
|
||||
|
||||
if ($conf->global->SOCIETE_SHOW_VAT_IN_LIST && !empty($obj->tva_intra)) {
|
||||
if (!empty($conf->global->SOCIETE_SHOW_VAT_IN_LIST) && !empty($obj->tva_intra)) {
|
||||
$label .= ' - '.$obj->tva_intra.'';
|
||||
}
|
||||
|
||||
@@ -8088,7 +8089,7 @@ class Form
|
||||
}
|
||||
} else { // There is no list of fields already customized for user
|
||||
foreach ($array as $key => $val) {
|
||||
if ($array[$key]['checked'] < 0) {
|
||||
if (!empty($array[$key]['checked']) && $array[$key]['checked'] < 0) {
|
||||
$array[$key]['checked'] = 0;
|
||||
}
|
||||
}
|
||||
@@ -8116,7 +8117,7 @@ class Form
|
||||
}
|
||||
|
||||
// Note: $val['checked'] <> 0 means we must show the field into the combo list
|
||||
$listoffieldsforselection .= '<li><input type="checkbox" id="checkbox'.$key.'" value="'.$key.'"'.((empty($val['checked']) && $val['checked'] != '-1') ? '' : ' checked="checked"').'/><label for="checkbox'.$key.'">'.dol_escape_htmltag($langs->trans($val['label'])).'</label></li>';
|
||||
$listoffieldsforselection .= '<li><input type="checkbox" id="checkbox'.$key.'" value="'.$key.'"'.((empty($val['checked']) || $val['checked'] == '-1') ? '' : ' checked="checked"').'/><label for="checkbox'.$key.'">'.dol_escape_htmltag($langs->trans($val['label'])).'</label></li>';
|
||||
$listcheckedstring .= (empty($val['checked']) ? '' : $key.',');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1172,8 +1172,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
$tooltip .= '<br>'.$langs->trans("GenericMaskCodes3");
|
||||
$tooltip .= '<br>'.$langs->trans("GenericMaskCodes4a", $langs->transnoentities("Batch"), $langs->transnoentities("Batch"));
|
||||
$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5");
|
||||
if (($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
|
||||
|| ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) {
|
||||
if ((!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced')
|
||||
|| (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) {
|
||||
print '<tr><td id="mask_option">'.$langs->trans("ManageLotMask").'</td>';
|
||||
$inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK;
|
||||
$inherited_mask_sn = $conf->global->SN_ADVANCED_MASK;
|
||||
@@ -1221,10 +1221,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
if ($showbarcode) {
|
||||
print '<tr><td>'.$langs->trans('BarcodeType').'</td><td>';
|
||||
if (GETPOSTISSET('fk_barcode_type')) {
|
||||
$fk_barcode_type = GETPOST('fk_barcode_type');
|
||||
$fk_barcode_type = GETPOST('fk_barcode_type')?:0;
|
||||
} else {
|
||||
if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) {
|
||||
$fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;
|
||||
$fk_barcode_type = getDolGlobalInt("PRODUIT_DEFAULT_BARCODE_TYPE");
|
||||
} else {
|
||||
$fk_barcode_type=0;
|
||||
}
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
||||
|
||||
@@ -256,7 +256,7 @@ $arrayfields = array(
|
||||
|
||||
|
||||
// MultiPrices
|
||||
if ($conf->global->PRODUIT_MULTIPRICES) {
|
||||
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||
for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) {
|
||||
$keyforlabel = 'PRODUIT_MULTIPRICES_LABEL'.$i;
|
||||
if (!empty($conf->global->$keyforlabel)) {
|
||||
@@ -405,7 +405,7 @@ $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
|
||||
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
|
||||
}
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)";
|
||||
}
|
||||
if (!empty($searchCategoryProductList) || !empty($catid)) {
|
||||
|
||||
@@ -46,6 +46,7 @@ $toolowstock = GETPOST('toolowstock');
|
||||
$tosell = GETPOST("tosell");
|
||||
$tobuy = GETPOST("tobuy");
|
||||
$fourn_id = GETPOST("fourn_id", 'int');
|
||||
$sbarcode = GETPOST("sbarcode", 'int');
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
|
||||
@@ -50,6 +50,7 @@ $toolowstock = GETPOST('toolowstock');
|
||||
$tosell = GETPOST("tosell");
|
||||
$tobuy = GETPOST("tobuy");
|
||||
$fourn_id = GETPOST("fourn_id", 'int');
|
||||
$sbarcode = GETPOST("sbarcode", 'int');
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
|
||||
@@ -67,6 +67,7 @@ $currentyear = $tmp['year'];
|
||||
if (empty($search_year)) {
|
||||
$search_year = $currentyear;
|
||||
}
|
||||
$moreforfilter = "";
|
||||
|
||||
$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
|
||||
|
||||
|
||||
@@ -1363,6 +1363,7 @@ print "</tr>\n";
|
||||
|
||||
$i = 0;
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user