fix : php 8.1 warnings + log warnings
This commit is contained in:
parent
0427457ce3
commit
002b0aa386
@ -8550,7 +8550,7 @@ class Form
|
||||
$tmpvalue = $value['label'];
|
||||
$tmpcolor = $value['color'];
|
||||
$tmppicto = $value['picto'];
|
||||
$tmplabelhtml = $value['labelhtml'];
|
||||
$tmplabelhtml = !empty($value['labelhtml']) ? $value['labelhtml'] : '';
|
||||
}
|
||||
$newval = ($translate ? $langs->trans($tmpvalue) : $tmpvalue);
|
||||
$newval = ($key_in_label ? $tmpkey . ' - ' . $newval : $newval);
|
||||
|
||||
@ -1380,7 +1380,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
|
||||
// Birthday
|
||||
if (!empty($arrayfields['t.birthday']['checked'])) {
|
||||
print '<td>';
|
||||
print dol_print_date($obj->birthday);
|
||||
print dol_print_date($db->jdate($obj->birthday));
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ llxHeader();
|
||||
|
||||
print load_fiche_titre($langs->trans("StatisticsOfSendings"), '', 'dolly');
|
||||
|
||||
|
||||
$dir = (!empty($conf->expedition->multidir_temp[$conf->entity]) ? $conf->expedition->multidir_temp[$conf->entity] : $conf->service->multidir_temp[$conf->entity]);
|
||||
dol_mkdir($dir);
|
||||
|
||||
$stats = new ExpeditionStats($db, $socid, '', ($userid > 0 ? $userid : 0));
|
||||
@ -84,6 +84,7 @@ if (empty($user->rights->societe->client->voir) || $user->socid) {
|
||||
|
||||
$px1 = new DolGraph();
|
||||
$mesg = $px1->isGraphKo();
|
||||
$fileurlnb = '';
|
||||
if (!$mesg) {
|
||||
$px1->SetData($data);
|
||||
$i = $startyear; $legend = array();
|
||||
|
||||
@ -895,10 +895,10 @@ class Productlot extends CommonObject
|
||||
//$datas['divopen'] = '<div width="100%">';
|
||||
$datas['batch'] = '<br><b>'.$langs->trans('Batch').':</b> '.$this->batch;
|
||||
if ($this->eatby && empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
$datas['eatby'] = '<br><b>'.$langs->trans('EatByDate').':</b> '.dol_print_date($this->eatby, 'day');
|
||||
$datas['eatby'] = '<br><b>'.$langs->trans('EatByDate').':</b> '.dol_print_date($this->db->jdate($this->eatby), 'day');
|
||||
}
|
||||
if ($this->sellby && empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
$datas['sellby'] = '<br><b>'.$langs->trans('SellByDate').':</b> '.dol_print_date($this->sellby, 'day');
|
||||
$datas['sellby'] = '<br><b>'.$langs->trans('SellByDate').':</b> '.dol_print_date($this->db->jdate($this->sellby), 'day');
|
||||
}
|
||||
//$datas['divclose'] = '</div>';
|
||||
|
||||
|
||||
@ -1481,7 +1481,7 @@ print '</div>';
|
||||
print "</form>";
|
||||
|
||||
// Add number of product when there is a filter on period
|
||||
if (count($arrayofuniqueproduct) == 1 && is_numeric($year)) {
|
||||
if (count($arrayofuniqueproduct) == 1 && !empty($year) && is_numeric($year)) {
|
||||
print "<br>";
|
||||
|
||||
$productidselected = 0;
|
||||
|
||||
@ -39,6 +39,7 @@ $langs->loadLangs(array('stocks', 'other', 'productbatch'));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
@ -568,7 +569,7 @@ if ($action != 'presend') {
|
||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
|
||||
$genallowed = $usercanread; // If you can read, you can build the PDF to read content
|
||||
$delallowed = $usercancreate; // If you can create/edit, you can remove a file on card
|
||||
print $formfile->showdocuments('product_batch', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $langs->default_lang, '', $object);
|
||||
print $formfile->showdocuments('product_batch', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', (empty($object->default_lang) ? '' : $object->default_lang), '', $object);
|
||||
}
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
@ -71,7 +71,7 @@ if ($origin == 'reception') {
|
||||
$result = restrictedArea($user, $origin, $object->id);
|
||||
} else {
|
||||
if ($origin == 'supplierorder' || $origin == 'order_supplier') {
|
||||
$result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande');
|
||||
$result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande');
|
||||
} elseif (!$user->hasRight($origin, "lire") && !$user->hasRight($origin, "read")) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ if ($origin == 'reception') {
|
||||
$result = restrictedArea($user, $origin, $object->id);
|
||||
} else {
|
||||
if ($origin == 'supplierorder' || $origin == 'order_supplier') {
|
||||
$result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande');
|
||||
$result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande');
|
||||
} elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ while ($i <= $MAXAGENDA) {
|
||||
print '<td class="nowraponall right">';
|
||||
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
||||
$color_value = (GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : (empty($object->conf->$color) ? 'ffffff' : $object->conf->$color));
|
||||
print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, '', 1, '', 'hideifnotset');
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user