forked from Wavyzz/dolibarr
Fix : php 8.1 warnings
This commit is contained in:
@@ -1253,7 +1253,7 @@ if ($action == 'create') {
|
|||||||
print $langs->trans("DayOfWeek").': <input type="input" size="4" name="BYDAY" value="'.$selectedrecurrulebyday.'">';
|
print $langs->trans("DayOfWeek").': <input type="input" size="4" name="BYDAY" value="'.$selectedrecurrulebyday.'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
// limit date
|
// limit date
|
||||||
$repeateventlimitdate = $repeateventlimitdate ? $repeateventlimitdate : '';
|
$repeateventlimitdate = !empty($repeateventlimitdate) ? $repeateventlimitdate : '';
|
||||||
print '<div class="hidden marginrightonly inline-block repeateventlimitdate">';
|
print '<div class="hidden marginrightonly inline-block repeateventlimitdate">';
|
||||||
print $langs->trans("Until")." ";
|
print $langs->trans("Until")." ";
|
||||||
print $form->selectDate($repeateventlimitdate, 'limit', 0, 0, 0, "action", 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
|
print $form->selectDate($repeateventlimitdate, 'limit', 0, 0, 0, "action", 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
|
||||||
|
|||||||
@@ -1561,6 +1561,7 @@ if ($resql) {
|
|||||||
|
|
||||||
$companylinked_id = 0;
|
$companylinked_id = 0;
|
||||||
$userlinked_id = 0;
|
$userlinked_id = 0;
|
||||||
|
$type_link = "";
|
||||||
|
|
||||||
//payment line type to define user display and user or company linked
|
//payment line type to define user display and user or company linked
|
||||||
foreach ($links as $key => $value) {
|
foreach ($links as $key => $value) {
|
||||||
|
|||||||
@@ -1209,7 +1209,7 @@ class BonPrelevement extends CommonObject
|
|||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
$labeltoshow = 'PaymentByDirectDebit';
|
$labeltoshow = 'PaymentByDirectDebit';
|
||||||
if ($this->type == 'bank-transfer') {
|
if (!empty($this->type) && $this->type == 'bank-transfer') {
|
||||||
$labeltoshow = 'PaymentByBankTransfer';
|
$labeltoshow = 'PaymentByBankTransfer';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1221,7 +1221,7 @@ class BonPrelevement extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id;
|
||||||
if ($this->type == 'bank-transfer') {
|
if (!empty($this->type) && $this->type == 'bank-transfer') {
|
||||||
$url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$texttoinsert .= (($val['notnull'] > 0) ? ' NOT NULL' : '');
|
$texttoinsert .= ((!empty($val['notnull']) && $val['notnull'] > 0) ? ' NOT NULL' : '');
|
||||||
if ($i < count($object->fields)) {
|
if ($i < count($object->fields)) {
|
||||||
$texttoinsert .= ", ";
|
$texttoinsert .= ", ";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ if (($id || $ref) && $action == 'edit') {
|
|||||||
// $value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $sk->$key;
|
// $value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $sk->$key;
|
||||||
// }
|
// }
|
||||||
//var_dump($val.' '.$key.' '.$value);
|
//var_dump($val.' '.$key.' '.$value);
|
||||||
if ($val['noteditable']) {
|
if (!empty($val['noteditable'])) {
|
||||||
print $sk->showOutputField($val, $key, $value, '', '', '', 0);
|
print $sk->showOutputField($val, $key, $value, '', '', '', 0);
|
||||||
} else {
|
} else {
|
||||||
/** @var Skilldet $sk */
|
/** @var Skilldet $sk */
|
||||||
|
|||||||
@@ -3112,7 +3112,7 @@ if ($module == 'initmodule') {
|
|||||||
$proplabel = $propval['label'];
|
$proplabel = $propval['label'];
|
||||||
$proptype = $propval['type'];
|
$proptype = $propval['type'];
|
||||||
$proparrayofkeyval = !empty($propval['arrayofkeyval'])?$propval['arrayofkeyval']:'';
|
$proparrayofkeyval = !empty($propval['arrayofkeyval'])?$propval['arrayofkeyval']:'';
|
||||||
$propnotnull = $propval['notnull'];
|
$propnotnull = !empty($propval['notnull']) ? $propval['notnull'] : '0';
|
||||||
$propdefault = !empty($propval['default'])?$propval['default']:'';
|
$propdefault = !empty($propval['default'])?$propval['default']:'';
|
||||||
$propindex = !empty($propval['index'])?$propval['index']:'';
|
$propindex = !empty($propval['index'])?$propval['index']:'';
|
||||||
$propforeignkey = !empty($propval['foreignkey'])?$propval['foreignkey']:'';
|
$propforeignkey = !empty($propval['foreignkey'])?$propval['foreignkey']:'';
|
||||||
|
|||||||
@@ -1286,7 +1286,7 @@ if ($action == 'create') {
|
|||||||
$lines = $object->lines;
|
$lines = $object->lines;
|
||||||
|
|
||||||
$num_prod = count($lines);
|
$num_prod = count($lines);
|
||||||
|
$indiceAsked = 0;
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
if (!empty($object->origin) && $object->origin_id > 0) {
|
if (!empty($object->origin) && $object->origin_id > 0) {
|
||||||
$object->origin = 'CommandeFournisseur';
|
$object->origin = 'CommandeFournisseur';
|
||||||
|
|||||||
@@ -87,38 +87,18 @@ if (!$rowid) {
|
|||||||
$option = array('limit' => $limit + 1);
|
$option = array('limit' => $limit + 1);
|
||||||
$num = 0;
|
$num = 0;
|
||||||
|
|
||||||
|
$param = '';
|
||||||
|
$totalnboflines = '';
|
||||||
|
$moreforfilter = '';
|
||||||
|
$list = null;
|
||||||
if (GETPOSTISSET('starting_after_'.$page)) {
|
if (GETPOSTISSET('starting_after_'.$page)) {
|
||||||
$option['starting_after'] = GETPOST('starting_after_'.$page, 'alphanohtml');
|
$option['starting_after'] = GETPOST('starting_after_'.$page, 'alphanohtml');
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
if ($stripeacc) {
|
|
||||||
$list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc));
|
|
||||||
} else {
|
|
||||||
$list = \Stripe\Charge::all($option);
|
|
||||||
}
|
|
||||||
|
|
||||||
$num = count($list->data);
|
|
||||||
|
|
||||||
$totalnboflines = '';
|
|
||||||
|
|
||||||
$param = '';
|
|
||||||
//if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
|
||||||
$param .= '&limit='.urlencode($limit);
|
|
||||||
}
|
|
||||||
$param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id;
|
|
||||||
//$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id;
|
|
||||||
|
|
||||||
$moreforfilter = '';
|
|
||||||
} catch (Exception $e) {
|
|
||||||
print $e->getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') {
|
if ($optioncss != '') {
|
||||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
@@ -145,8 +125,29 @@ if (!$rowid) {
|
|||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right ');
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ($stripeacc) {
|
||||||
|
$list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc));
|
||||||
|
} else {
|
||||||
|
$list = \Stripe\Charge::all($option);
|
||||||
|
}
|
||||||
|
|
||||||
|
$num = count($list->data);
|
||||||
|
|
||||||
|
|
||||||
|
//if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
|
$param .= '&limit='.urlencode($limit);
|
||||||
|
}
|
||||||
|
$param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id;
|
||||||
|
//$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
print '<tr><td colspan="6">'.$e->getMessage().'</td></td>';
|
||||||
|
}
|
||||||
|
|
||||||
//print $list;
|
//print $list;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
if (!empty($list)) {
|
||||||
foreach ($list->data as $charge) {
|
foreach ($list->data as $charge) {
|
||||||
if ($i >= $limit) {
|
if ($i >= $limit) {
|
||||||
break;
|
break;
|
||||||
@@ -286,6 +287,7 @@ if (!$rowid) {
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Reference in New Issue
Block a user