-
Notifications
You must be signed in to change notification settings - Fork 43
#4171 [Digirisk] fix: php8 warnings #4335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finir de répercuter les changements aux endroits qui peuvent encore être clean et c'est good
@@ -254,7 +254,7 @@ public function selectDigiriskElementList($selected = '', $htmlname = 'fk_elemen | |||
{ | |||
global $conf, $form, $langs; | |||
|
|||
if (dol_strlen($filter['customsql'])) { | |||
if (!empty($filter['customsql']) && dol_strlen($filter['customsql'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si !empty($filter) alors il est forcément rempli c'est redondant, il faut plutôt vérifier si dol_strlen est supérieur à > 0 pour retirer le warning ou seulement laisser !empty()
@@ -254,7 +254,7 @@ public function selectDigiriskElementList($selected = '', $htmlname = 'fk_elemen | |||
{ | |||
global $conf, $form, $langs; | |||
|
|||
if (dol_strlen($filter['customsql'])) { | |||
if (!empty($filter['customsql']) && dol_strlen($filter['customsql'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si !empty($filter) alors il est forcément rempli c'est redondant, il faut plutôt vérifier si dol_strlen est supérieur à > 0 pour retirer le warning ou seulement laisser !empty()
@@ -346,7 +346,7 @@ public function select_preventionplan_list($selected = '', $htmlname = 'fk_preve | |||
{ | |||
global $form; | |||
|
|||
if (dol_strlen($filter['customsql'])) { | |||
if (!empty($filter['customsql']) && dol_strlen($filter['customsql'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pareil
if ( ! $evalsortfield) $evalsortfield = "evaluation." . key($evaluation->fields); | ||
if (empty($sortfield)) $sortfield = $conf->global->DIGIRISKDOLIBARR_SORT_LISTINGS_BY_COTATION ? "evaluation.cotation" : "r." . key($risk->fields);; // Set here default search field. By default 1st field in definition. | ||
if (empty($sortorder)) $sortorder = $conf->global->DIGIRISKDOLIBARR_SORT_LISTINGS_BY_COTATION ? "DESC" : "ASC" ; | ||
if (empty($evalsortfield)) $evalsortfield = "evaluation." . key($evaluation->fields); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce bloc est également présent dans les fichiers firepermit_list, evaluator, risk, risksign, risk_list, etc... tant qu'à clean les warning autant ctrl + alt + f pour voir toute les occurrences et les réparer pour ne plus avoir à s'en soucier plus tard
No description provided.