diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 7788c72ea59..9a8c59b8533 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1253,7 +1253,7 @@ if ($action == 'create') {
print $langs->trans("DayOfWeek").': ';
print '';
// limit date
- $repeateventlimitdate = $repeateventlimitdate ? $repeateventlimitdate : '';
+ $repeateventlimitdate = !empty($repeateventlimitdate) ? $repeateventlimitdate : '';
print '
';
print $langs->trans("Until")." ";
print $form->selectDate($repeateventlimitdate, 'limit', 0, 0, 0, "action", 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index c6ec38abded..b0514c71ee6 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -1561,6 +1561,7 @@ if ($resql) {
$companylinked_id = 0;
$userlinked_id = 0;
+ $type_link = "";
//payment line type to define user display and user or company linked
foreach ($links as $key => $value) {
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 344229dc0a8..959630a5538 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -1209,7 +1209,7 @@ class BonPrelevement extends CommonObject
$result = '';
$labeltoshow = 'PaymentByDirectDebit';
- if ($this->type == 'bank-transfer') {
+ if (!empty($this->type) && $this->type == 'bank-transfer') {
$labeltoshow = 'PaymentByBankTransfer';
}
@@ -1221,7 +1221,7 @@ class BonPrelevement extends CommonObject
}
$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;
}
diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php
index 498e587a328..163c90aa8a9 100644
--- a/htdocs/core/lib/modulebuilder.lib.php
+++ b/htdocs/core/lib/modulebuilder.lib.php
@@ -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)) {
$texttoinsert .= ", ";
}
diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php
index c057d0e0e31..9c5de6bf7f5 100644
--- a/htdocs/hrm/skill_card.php
+++ b/htdocs/hrm/skill_card.php
@@ -332,7 +332,7 @@ if (($id || $ref) && $action == 'edit') {
// $value = GETPOSTISSET($key) ? GETPOST($key, 'alpha') : $sk->$key;
// }
//var_dump($val.' '.$key.' '.$value);
- if ($val['noteditable']) {
+ if (!empty($val['noteditable'])) {
print $sk->showOutputField($val, $key, $value, '', '', '', 0);
} else {
/** @var Skilldet $sk */
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index de3059b264f..8b87d84c10e 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -3112,7 +3112,7 @@ if ($module == 'initmodule') {
$proplabel = $propval['label'];
$proptype = $propval['type'];
$proparrayofkeyval = !empty($propval['arrayofkeyval'])?$propval['arrayofkeyval']:'';
- $propnotnull = $propval['notnull'];
+ $propnotnull = !empty($propval['notnull']) ? $propval['notnull'] : '0';
$propdefault = !empty($propval['default'])?$propval['default']:'';
$propindex = !empty($propval['index'])?$propval['index']:'';
$propforeignkey = !empty($propval['foreignkey'])?$propval['foreignkey']:'';
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 9fdae4e0cc7..adbbdfefa80 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -1286,7 +1286,7 @@ if ($action == 'create') {
$lines = $object->lines;
$num_prod = count($lines);
-
+ $indiceAsked = 0;
if ($object->id > 0) {
if (!empty($object->origin) && $object->origin_id > 0) {
$object->origin = 'CommandeFournisseur';
diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php
index f598275177e..0aee0c11e30 100644
--- a/htdocs/stripe/charge.php
+++ b/htdocs/stripe/charge.php
@@ -87,38 +87,18 @@ if (!$rowid) {
$option = array('limit' => $limit + 1);
$num = 0;
+ $param = '';
+ $totalnboflines = '';
+ $moreforfilter = '';
+ $list = null;
if (GETPOSTISSET('starting_after_'.$page)) {
$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 '