diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index f227902c745..cc255af32f0 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -463,7 +463,7 @@ parameters: path: ../../../htdocs/accountancy/class/accountingaccount.class.php - - message: '#^Call to function array_key_exists\(\) with ''error'' and array\{ref\: mixed, label\: mixed, acquisition_value_ht\: mixed, depreciation\: non\-empty\-array\\}\>, disposal\?\: array\{date\: mixed, amount\: mixed, subject_to_vat\: bool\}\} will always evaluate to false\.$#' + message: '#^Call to function array_key_exists\(\) with ''error'' and array\{ref\: mixed, label\: mixed, acquisition_value_ht\: mixed, depreciation\: non\-empty\-array\, disposal\?\: array\{date\: mixed, amount\: mixed, subject_to_vat\: bool\}\} will always evaluate to false\.$#' identifier: function.impossibleType count: 1 path: ../../../htdocs/accountancy/class/accountingjournal.class.php @@ -765,13 +765,13 @@ parameters: - message: '#^Call to function is_array\(\) with non\-empty\-array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 1 + count: 4 path: ../../../htdocs/accountancy/journal/bankjournal.php - - message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 3 + message: '#^Loose comparison using \=\= between ''unknown'' and ''unknown'' will always evaluate to true\.$#' + identifier: equal.alwaysTrue + count: 1 path: ../../../htdocs/accountancy/journal/bankjournal.php - @@ -897,13 +897,7 @@ parameters: - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/adherents/class/adherent.class.php - - - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 + count: 2 path: ../../../htdocs/adherents/class/adherent.class.php - @@ -1164,6 +1158,12 @@ parameters: count: 1 path: ../../../htdocs/admin/dict.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../htdocs/admin/dict.php + - message: '#^Loose comparison using \!\= between ''create'' and ''edit'' will always evaluate to true\.$#' identifier: notEqual.alwaysTrue @@ -1206,6 +1206,18 @@ parameters: count: 1 path: ../../../htdocs/admin/eventorganization.php + - + message: '#^Loose comparison using \=\= between ''category\:customer''\|''emailtemplate…''\|''product''\|''securekey''\|''thirdparty_type\:'' and ''html'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/admin/eventorganization.php + + - + message: '#^Loose comparison using \=\= between ''category\:customer''\|''emailtemplate…''\|''product''\|''securekey''\|''thirdparty_type\:'' and ''yesno'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/admin/eventorganization.php + - message: '#^Loose comparison using \=\= between 1 and 1 will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -1230,6 +1242,24 @@ parameters: count: 1 path: ../../../htdocs/admin/events.php + - + message: '#^Loose comparison using \=\= between ''DETAILS''\|''MAIL''\|''MAILING''\|''NOTE_PRIVATE''\|''NOTE_PUBLIC''\|''SOCIETE''\|''TICKET''\|''USERSIGN'' and ''PRODUCTDESC'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/admin/fckeditor.php + + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 1 + path: ../../../htdocs/admin/fckeditor.php + + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../htdocs/admin/fediverse.php + - message: '#^Variable \$result might not be defined\.$#' identifier: variable.undefined @@ -1248,6 +1278,30 @@ parameters: count: 2 path: ../../../htdocs/admin/hrm.php + - + message: '#^Loose comparison using \=\= between ''integer''\|''varchar'' and ''html'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/admin/hrm.php + + - + message: '#^Loose comparison using \=\= between ''integer''\|''varchar'' and ''product'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/admin/hrm.php + + - + message: '#^Loose comparison using \=\= between ''integer''\|''varchar'' and ''textarea'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/admin/hrm.php + + - + message: '#^Loose comparison using \=\= between ''integer''\|''varchar'' and ''yesno'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/admin/hrm.php + - message: '#^Loose comparison using \=\= between ''varchar'' and ''html'' will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -1344,6 +1398,42 @@ parameters: count: 1 path: ../../../htdocs/admin/knowledgemanagement.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/ldap.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/ldap_contacts.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/ldap_groups.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/ldap_members.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/ldap_members_types.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/ldap_users.php + - message: '#^Parameter \#12 \$localtaxes_array of function calcul_price_total expects array\{string, int\|string, string, int\|string, string, string\}\|array\{string, int\|string, string, string\}, array\{\} given\.$#' identifier: argument.type @@ -1362,12 +1452,24 @@ parameters: count: 1 path: ../../../htdocs/admin/mails.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 7 + path: ../../../htdocs/admin/mails.php + - message: '#^Variable \$text in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable count: 4 path: ../../../htdocs/admin/mails.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 7 + path: ../../../htdocs/admin/mails_emailing.php + - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -1380,6 +1482,12 @@ parameters: count: 2 path: ../../../htdocs/admin/mails_emailing.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 7 + path: ../../../htdocs/admin/mails_passwordreset.php + - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -1431,9 +1539,15 @@ parameters: - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue - count: 1 + count: 2 path: ../../../htdocs/admin/mails_templates.php + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 7 + path: ../../../htdocs/admin/mails_ticket.php + - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -1458,12 +1572,24 @@ parameters: count: 2 path: ../../../htdocs/admin/menus/edit.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../htdocs/admin/menus/index.php + - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 2 path: ../../../htdocs/admin/modules.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../htdocs/admin/modules.php + - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1476,6 +1602,12 @@ parameters: count: 1 path: ../../../htdocs/admin/modules.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 5 + path: ../../../htdocs/admin/modules.php + - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -1500,6 +1632,12 @@ parameters: count: 1 path: ../../../htdocs/admin/notification.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 3 + path: ../../../htdocs/admin/notification.php + - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -1530,6 +1668,12 @@ parameters: count: 1 path: ../../../htdocs/admin/oauthlogintokens.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 6 + path: ../../../htdocs/admin/oauthlogintokens.php + - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1548,6 +1692,18 @@ parameters: count: 2 path: ../../../htdocs/admin/perms.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 3 + path: ../../../htdocs/admin/perms.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 11 + path: ../../../htdocs/admin/receiptprinter.php + - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -1590,12 +1746,24 @@ parameters: count: 1 path: ../../../htdocs/admin/system/constall.php + - + message: '#^Loose comparison using \=\= between 0\|1 and 2 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/admin/system/database.php + - message: '#^Variable \$row might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/admin/system/dbtable.php + - + message: '#^Loose comparison using \!\= between '',''\|''\.'' and '' '' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/admin/system/dolibarr.php + - message: '#^Variable \$conffiletoshowshort might not be defined\.$#' identifier: variable.undefined @@ -1680,6 +1848,12 @@ parameters: count: 1 path: ../../../htdocs/admin/system/security.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/system/security.php + - message: '#^Variable \$dolibarr_main_document_root might not be defined\.$#' identifier: variable.undefined @@ -1752,6 +1926,24 @@ parameters: count: 1 path: ../../../htdocs/admin/tools/export.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/admin/tools/listevents.php + + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 3 + path: ../../../htdocs/admin/tools/listsessions.php + + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: ../../../htdocs/admin/tools/purge.php + - message: '#^Method Documentation\:\:displayMenu\(\) has parameter \$menu with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1926,6 +2118,12 @@ parameters: count: 2 path: ../../../htdocs/api/class/api_documents.class.php + - + message: '#^Loose comparison using \!\= between ''adherent''\|''agenda''\|''commande''\|''contact''\|''contrat''\|''expensereport''\|''facture''\|''fichinter''\|''mrp''\|''product''\|''produit''\|''produit\|service''\|''project''\|''project_task''\|''projet''\|''propale''\|''service''\|''supplier_invoice''\|''supplier_order'' and ''ecm'' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/api/class/api_documents.class.php + - message: '#^Method Documents\:\:builddoc\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -2238,6 +2436,42 @@ parameters: count: 1 path: ../../../htdocs/asset/admin/setup.php + - + message: '#^Loose comparison using \=\= between ''accountancy_category''\|''string'' and ''accountancy_code'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/asset/admin/setup.php + + - + message: '#^Loose comparison using \=\= between ''accountancy_category''\|''string'' and ''html'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/asset/admin/setup.php + + - + message: '#^Loose comparison using \=\= between ''accountancy_category''\|''string'' and ''product'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/asset/admin/setup.php + + - + message: '#^Loose comparison using \=\= between ''accountancy_category''\|''string'' and ''securekey'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/asset/admin/setup.php + + - + message: '#^Loose comparison using \=\= between ''accountancy_category''\|''string'' and ''textarea'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/asset/admin/setup.php + + - + message: '#^Loose comparison using \=\= between ''accountancy_category''\|''string'' and ''yesno'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/asset/admin/setup.php + - message: '#^Loose comparison using \=\= between 1 and 1 will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -3525,7 +3759,7 @@ parameters: - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue - count: 1 + count: 2 path: ../../../htdocs/comm/action/class/cactioncomm.class.php - @@ -3630,6 +3864,12 @@ parameters: count: 1 path: ../../../htdocs/comm/action/list.php + - + message: '#^Loose comparison using \!\= between ''event\-current''\|''event\-future''\|''event\-past'' and '''' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/comm/action/list.php + - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -3690,12 +3930,36 @@ parameters: count: 1 path: ../../../htdocs/comm/action/pertype.php + - + message: '#^Loose comparison using \=\= between ''show_day''\|''show_month''\|''show_pertype''\|''show_week'' and ''show_year'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/action/pertype.php + + - + message: '#^Loose comparison using \=\= between ''show_month''\|''show_pertype'' and ''show_week'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/action/pertype.php + + - + message: '#^Loose comparison using \=\= between ''show_month''\|''show_pertype''\|''show_week'' and ''show_day'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/action/pertype.php + - message: '#^Loose comparison using \=\= between int\<2, max\> and 1 will always evaluate to false\.$#' identifier: equal.alwaysFalse count: 2 path: ../../../htdocs/comm/action/pertype.php + - + message: '#^Parameter \#1 \$string of function urlencode expects string, int\<0, 23\> given\.$#' + identifier: argument.type + count: 1 + path: ../../../htdocs/comm/action/pertype.php + - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -3756,6 +4020,12 @@ parameters: count: 1 path: ../../../htdocs/comm/action/peruser.php + - + message: '#^Loose comparison using \=\= between ''show_peruser''\|''show_week'' and ''show_day'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/action/peruser.php + - message: '#^Loose comparison using \=\= between int\<2, max\> and 1 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -3858,6 +4128,18 @@ parameters: count: 1 path: ../../../htdocs/comm/mailing/card.php + - + message: '#^Loose comparison using \=\= between ''setevenunsubscribe''\|''setreplyto'' and ''setfrom'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/mailing/card.php + + - + message: '#^Loose comparison using \=\= between ''setevenunsubscribe''\|''setreplyto'' and ''settitle'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/mailing/card.php + - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -3870,6 +4152,12 @@ parameters: count: 1 path: ../../../htdocs/comm/mailing/card.php + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 2 + path: ../../../htdocs/comm/mailing/card.php + - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -3972,12 +4260,24 @@ parameters: count: 1 path: ../../../htdocs/comm/propal/card.php + - + message: '#^Loose comparison using \=\= between ''HT''\|null and ''TTC'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/comm/propal/card.php + - message: '#^Property CommonObject\:\:\$fk_project \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../../htdocs/comm/propal/card.php + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 1 + path: ../../../htdocs/comm/propal/card.php + - message: '#^Variable \$classname might not be defined\.$#' identifier: variable.undefined @@ -4788,12 +5088,24 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/bankentries_list.php + - + message: '#^Loose comparison using \=\= between numeric\-string and '''' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/compta/bank/bankentries_list.php + - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 1 path: ../../../htdocs/compta/bank/bankentries_list.php + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 1 + path: ../../../htdocs/compta/bank/bankentries_list.php + - message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -5004,6 +5316,12 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/line.php + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 1 + path: ../../../htdocs/compta/bank/line.php + - message: '#^Variable \$filepath might not be defined\.$#' identifier: variable.undefined @@ -5994,6 +6312,12 @@ parameters: count: 2 path: ../../../htdocs/compta/localtax/class/localtax.class.php + - + message: '#^Loose comparison using \=\= between non\-falsy\-string and 0 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 5 + path: ../../../htdocs/compta/localtax/clients.php + - message: '#^Variable \$arrayofselected might not be defined\.$#' identifier: variable.undefined @@ -6252,6 +6576,12 @@ parameters: count: 2 path: ../../../htdocs/compta/paiement_vat.php + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 2 + path: ../../../htdocs/compta/prelevement/card.php + - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -7212,6 +7542,12 @@ parameters: count: 3 path: ../../../htdocs/contact/list.php + - + message: '#^Loose comparison using \!\= between int and '''' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/contact/list.php + - message: '#^Loose comparison using \=\= between 0 and 0 will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -7674,6 +8010,18 @@ parameters: count: 4 path: ../../../htdocs/core/actions_addupdatedelete.inc.php + - + message: '#^Comparison operation "\>" between false and 0 is always false\.$#' + identifier: greater.alwaysFalse + count: 1 + path: ../../../htdocs/core/actions_builddoc.inc.php + + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../htdocs/core/actions_builddoc.inc.php + - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -8034,6 +8382,12 @@ parameters: count: 1 path: ../../../htdocs/core/ajax/editinline.php + - + message: '#^Variable \$upload_dir in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable + count: 1 + path: ../../../htdocs/core/ajax/flowjs-server.php + - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -8778,6 +9132,12 @@ parameters: count: 1 path: ../../../htdocs/core/class/comment.class.php + - + message: '#^Loose comparison using \!\= between non\-falsy\-string and '''' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/core/class/commondocgenerator.class.php + - message: '#^Property CommonObject\:\:\$element \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -9018,12 +9378,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/commonobject.class.php - - - message: '#^Variable \$newProperty in isset\(\) always exists and is not nullable\.$#' - identifier: isset.variable - count: 1 - path: ../../../htdocs/core/class/commonobject.class.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -9456,6 +9810,12 @@ parameters: count: 1 path: ../../../htdocs/core/class/dolgraph.class.php + - + message: '#^Loose comparison using \!\= between ''bar''\|''line'' and ''horizontalBar'' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/core/class/dolgraph.class.php + - message: '#^Loose comparison using \=\= between ''line'' and ''horizontalBar'' will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -9702,6 +10062,18 @@ parameters: count: 1 path: ../../../htdocs/core/class/html.form.class.php + - + message: '#^Loose comparison using \=\= between ''formai''\|''formaiforlines''\|''formaiwithlines'' and ''formforlines'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formai.class.php + + - + message: '#^Loose comparison using \=\= between ''formai''\|''formaiforlines''\|''formaiwithlines'' and ''formwithlines'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formai.class.php + - message: '#^Variable \$select_encoder might not be defined\.$#' identifier: variable.undefined @@ -9780,12 +10152,30 @@ parameters: count: 1 path: ../../../htdocs/core/class/html.formfile.class.php + - + message: '#^Loose comparison using \=\= between 0\|2\|3\|6 and 1 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formfile.class.php + + - + message: '#^Loose comparison using \=\= between 0\|2\|3\|6 and 5 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formfile.class.php + - message: '#^Property CommonObject\:\:\$id \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property count: 1 path: ../../../htdocs/core/class/html.formfile.class.php + - + message: '#^Result of \|\| is always false\.$#' + identifier: booleanOr.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formfile.class.php + - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -9810,6 +10200,18 @@ parameters: count: 1 path: ../../../htdocs/core/class/html.formmail.class.php + - + message: '#^Loose comparison using \=\= between ''formemail''\|''formemailforlines''\|''formemailwithlines'' and ''formforlines'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formmail.class.php + + - + message: '#^Loose comparison using \=\= between ''formemail''\|''formemailforlines''\|''formemailwithlines'' and ''formwithlines'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/core/class/html.formmail.class.php + - message: '#^Property FormMail\:\:\$ckeditortoolbar \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -9889,7 +10291,7 @@ parameters: path: ../../../htdocs/core/class/html.formticket.class.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' + message: '#^Call to function is_array\(\) with list will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 2 path: ../../../htdocs/core/class/html.formticket.class.php @@ -10905,7 +11307,7 @@ parameters: - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue - count: 2 + count: 3 path: ../../../htdocs/core/lib/functions.lib.php - @@ -10926,6 +11328,12 @@ parameters: count: 1 path: ../../../htdocs/core/lib/functions.lib.php + - + message: '#^Loose comparison using \=\= between 1\|2 and 4 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/core/lib/functions.lib.php + - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -11142,6 +11550,12 @@ parameters: count: 1 path: ../../../htdocs/core/lib/order.lib.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 11 + path: ../../../htdocs/core/lib/pdf.lib.php + - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse @@ -11370,36 +11784,12 @@ parameters: count: 1 path: ../../../htdocs/core/menus/standard/auguria.lib.php - - - message: '#^Offset ''level'' on array\{url\: mixed\} in empty\(\) does not exist\.$#' - identifier: empty.offset - count: 1 - path: ../../../htdocs/core/menus/standard/auguria.lib.php - - - - message: '#^Offset ''mainmenu'' on array\{url\: mixed\} in empty\(\) does not exist\.$#' - identifier: empty.offset - count: 2 - path: ../../../htdocs/core/menus/standard/auguria.lib.php - - - - message: '#^Offset ''prefix'' on array\{url\: mixed\} in empty\(\) does not exist\.$#' - identifier: empty.offset - count: 2 - path: ../../../htdocs/core/menus/standard/auguria.lib.php - - message: '#^Parameter \#8 \$menuval of function print_text_menu_entry_auguria expects array\{\}\|array\{rowid\: string, fk_menu\: string, langs\: string, enabled\: int\<0, 2\>, type\: string, fk_mainmenu\: string, fk_leftmenu\: string, url\: string, \.\.\.\}, array\{url\: string, titre\: string, enabled\: int\<0, 2\>, target\: string, mainmenu\: string, leftmenu\: string, position\: int, level\?\: int, \.\.\.\} given\.$#' identifier: argument.type count: 1 path: ../../../htdocs/core/menus/standard/auguria.lib.php - - - message: '#^Result of && is always false\.$#' - identifier: booleanAnd.alwaysFalse - count: 1 - path: ../../../htdocs/core/menus/standard/auguria.lib.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -11430,36 +11820,12 @@ parameters: count: 4 path: ../../../htdocs/core/menus/standard/eldy.lib.php - - - message: '#^Offset ''level'' on array\{url\: mixed\} in empty\(\) does not exist\.$#' - identifier: empty.offset - count: 1 - path: ../../../htdocs/core/menus/standard/eldy.lib.php - - - - message: '#^Offset ''mainmenu'' on array\{url\: mixed\} in empty\(\) does not exist\.$#' - identifier: empty.offset - count: 2 - path: ../../../htdocs/core/menus/standard/eldy.lib.php - - - - message: '#^Offset ''prefix'' on array\{url\: mixed\} in empty\(\) does not exist\.$#' - identifier: empty.offset - count: 2 - path: ../../../htdocs/core/menus/standard/eldy.lib.php - - message: '#^Parameter \#8 \$menuval of function print_text_menu_entry expects array\{\}\|array\{rowid\: string, fk_menu\: string, langs\: string, enabled\: int\<0, 2\>, type\: string, fk_mainmenu\: string, fk_leftmenu\: string, url\: string, \.\.\.\}, array\{url\: string, titre\: string, enabled\: int\<0, 2\>, target\: string, mainmenu\: string, leftmenu\: string, position\: int, level\?\: int, \.\.\.\} given\.$#' identifier: argument.type count: 1 path: ../../../htdocs/core/menus/standard/eldy.lib.php - - - message: '#^Result of && is always false\.$#' - identifier: booleanAnd.alwaysFalse - count: 1 - path: ../../../htdocs/core/menus/standard/eldy.lib.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -11934,6 +12300,24 @@ parameters: count: 2 path: ../../../htdocs/core/modules/dons/html_cerfafr.modules.php + - + message: '#^Loose comparison using \!\= between int\\|int\<1, max\> and '''' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 6 + path: ../../../htdocs/core/modules/dons/html_cerfafr.modules.php + + - + message: '#^Loose comparison using \=\= between int and '''' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/core/modules/dons/html_cerfafr.modules.php + + - + message: '#^Loose comparison using \=\= between int\\|int\<1, max\> and '''' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 4 + path: ../../../htdocs/core/modules/dons/html_cerfafr.modules.php + - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -15639,7 +16023,7 @@ parameters: - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue - count: 1 + count: 5 path: ../../../htdocs/expedition/card.php - @@ -15936,6 +16320,18 @@ parameters: count: 1 path: ../../../htdocs/expedition/dispatch.php + - + message: '#^Loose comparison using \=\= between ''commande''\|null and ''propal'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/expedition/dispatch.php + + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 4 + path: ../../../htdocs/expedition/dispatch.php + - message: '#^Variable \$objectsrc might not be defined\.$#' identifier: variable.undefined @@ -17484,6 +17880,12 @@ parameters: count: 1 path: ../../../htdocs/fourn/commande/document.php + - + message: '#^Loose comparison using \=\= between 0\|1\|2\|3\|4\|5\|9 and 7 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/fourn/commande/index.php + - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -18744,6 +19146,12 @@ parameters: count: 12 path: ../../../htdocs/imports/import.php + - + message: '#^Loose comparison using \=\= between ''guess''\|''session'' and ''orderoftargets'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/imports/import.php + - message: '#^Loose comparison using \=\= between ''session'' and ''session'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -19416,6 +19824,12 @@ parameters: count: 1 path: ../../../htdocs/main.inc.php + - + message: '#^Loose comparison using \=\= between ''''\|''0'' and 1 will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/main.inc.php + - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -19686,6 +20100,12 @@ parameters: count: 1 path: ../../../htdocs/modulebuilder/template/admin/myobject_extrafields.php + - + message: '#^Negated boolean expression is always false\.$#' + identifier: booleanNot.alwaysFalse + count: 1 + path: ../../../htdocs/modulebuilder/template/admin/setup.php + - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -20274,6 +20694,12 @@ parameters: count: 1 path: ../../../htdocs/mrp/class/moline.class.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 1 + path: ../../../htdocs/mrp/index.php + - message: '#^Variable \$badgeStatus0 might not be defined\.$#' identifier: variable.undefined @@ -20487,13 +20913,7 @@ parameters: - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue - count: 3 - path: ../../../htdocs/multicurrency/multicurrency_rate.php - - - - message: '#^Variable \$arrayofmassactions might not be defined\.$#' - identifier: variable.undefined - count: 1 + count: 4 path: ../../../htdocs/multicurrency/multicurrency_rate.php - @@ -20826,6 +21246,12 @@ parameters: count: 2 path: ../../../htdocs/partnership/partnership_list.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/paybox/admin/paybox.php + - message: '#^Variable \$IBS_DEVISE in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -20844,6 +21270,12 @@ parameters: count: 1 path: ../../../htdocs/paybox/lib/paybox.lib.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/paypal/admin/paypal.php + - message: '#^Comparison operation "\<" between \-1 and 0 is always true\.$#' identifier: smaller.alwaysTrue @@ -20868,6 +21300,12 @@ parameters: count: 1 path: ../../../htdocs/paypal/lib/paypal.lib.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 6 + path: ../../../htdocs/printing/admin/printing.php + - message: '#^Variable \$classfile might not be defined\.$#' identifier: variable.undefined @@ -21726,12 +22164,42 @@ parameters: count: 1 path: ../../../htdocs/product/stats/bom.php + - + message: '#^Loose comparison using \=\= between ''contracts''\|''invoices''\|''invoicessuppliers''\|''mrp''\|''orders''\|''orderssuppliers''\|''propal''\|''proposalssuppliers'' and ''invoices_suppliers'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/product/stats/card.php + + - + message: '#^Loose comparison using \=\= between ''contracts''\|''invoices''\|''invoicessuppliers''\|''mrp''\|''orders''\|''orderssuppliers''\|''propal''\|''proposalssuppliers'' and ''order'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/product/stats/card.php + + - + message: '#^Loose comparison using \=\= between ''contracts''\|''invoices''\|''invoicessuppliers''\|''mrp''\|''orders''\|''orderssuppliers''\|''propal''\|''proposalssuppliers'' and ''orders_suppliers'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/product/stats/card.php + + - + message: '#^Loose comparison using \=\= between ''contracts''\|''invoices''\|''invoicessuppliers''\|''mrp''\|''orders''\|''orderssuppliers''\|''propal''\|''proposalssuppliers'' and ''proposals_suppliers'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/product/stats/card.php + - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 2 path: ../../../htdocs/product/stats/card.php + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 4 + path: ../../../htdocs/product/stats/card.php + - message: '#^Variable \$sortfield in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -22662,6 +23130,12 @@ parameters: count: 1 path: ../../../htdocs/projet/card.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/projet/card.php + - message: '#^Variable \$morecss might not be defined\.$#' identifier: variable.undefined @@ -23268,6 +23742,12 @@ parameters: count: 5 path: ../../../htdocs/projet/tasks/list.php + - + message: '#^Loose comparison using \=\= between ''0''\|array\{\} and '''' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/projet/tasks/list.php + - message: '#^Loose comparison using \=\= between 0 and 0 will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -24510,12 +24990,30 @@ parameters: count: 2 path: ../../../htdocs/reception/card.php + - + message: '#^Loose comparison using \=\= between ''''\|''CommandeFournisseur'' and ''commande'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/reception/card.php + + - + message: '#^Loose comparison using \=\= between ''''\|''CommandeFournisseur'' and ''propal'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 2 + path: ../../../htdocs/reception/card.php + - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue count: 1 path: ../../../htdocs/reception/card.php + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 8 + path: ../../../htdocs/reception/card.php + - message: '#^Variable \$extrafields in empty\(\) always exists and is not falsy\.$#' identifier: empty.variable @@ -24762,6 +25260,24 @@ parameters: count: 1 path: ../../../htdocs/reception/dispatch.php + - + message: '#^Loose comparison using \=\= between ''''\|''CommandeFournisseur'' and ''commande'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/reception/dispatch.php + + - + message: '#^Loose comparison using \=\= between ''''\|''CommandeFournisseur'' and ''propal'' will always evaluate to false\.$#' + identifier: equal.alwaysFalse + count: 1 + path: ../../../htdocs/reception/dispatch.php + + - + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse + count: 4 + path: ../../../htdocs/reception/dispatch.php + - message: '#^Variable \$objectsrc might not be defined\.$#' identifier: variable.undefined @@ -25074,6 +25590,12 @@ parameters: count: 1 path: ../../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 2 + path: ../../../htdocs/recruitment/index.php + - message: '#^Variable \$badgeStatus0 might not be defined\.$#' identifier: variable.undefined @@ -26016,6 +26538,12 @@ parameters: count: 1 path: ../../../htdocs/societe/class/societe.class.php + - + message: '#^Loose comparison using \!\= between ''email''\|''mobile'' and ''poste'' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 2 + path: ../../../htdocs/societe/class/societe.class.php + - message: '#^Method Societe\:\:getContacts\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -26088,6 +26616,12 @@ parameters: count: 1 path: ../../../htdocs/societe/class/societe.class.php + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 1 + path: ../../../htdocs/societe/class/societe.class.php + - message: '#^Loose comparison using \=\= between 0 and 1 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -26256,6 +26790,12 @@ parameters: count: 4 path: ../../../htdocs/societe/website.php + - + message: '#^Right side of && is always true\.$#' + identifier: booleanAnd.rightAlwaysTrue + count: 1 + path: ../../../htdocs/stripe/admin/stripe.php + - message: '#^Call to function is_object\(\) with Facture will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -26700,6 +27240,12 @@ parameters: count: 1 path: ../../../htdocs/takepos/printbox.php + - + message: '#^Loose comparison using \!\= between mixed and '''' will always evaluate to true\.$#' + identifier: notEqual.alwaysTrue + count: 1 + path: ../../../htdocs/takepos/receipt.php + - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -26724,54 +27270,6 @@ parameters: count: 3 path: ../../../htdocs/theme/eldy/btn.inc.php - - - message: '#^Variable \$nbtopmenuentries might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/theme/eldy/btn.inc.php - - - - message: '#^Variable \$colorbackhmenu1 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - - - message: '#^Variable \$colorbacklinepair1 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - - - message: '#^Variable \$colortextbackhmenu might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - - - message: '#^Variable \$colortextlink might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - - - message: '#^Variable \$disableimages might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - - - message: '#^Variable \$left might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - - - message: '#^Variable \$right might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/dropdown.inc.php - - message: '#^Variable \$theme might not be defined\.$#' identifier: variable.undefined @@ -26790,48 +27288,12 @@ parameters: count: 1 path: ../../../htdocs/theme/eldy/info-box.inc.php - - - message: '#^Variable \$topMenuFontSize might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/main_menu_fa_icons.inc.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue count: 1 path: ../../../htdocs/theme/eldy/manifest.json.php - - - message: '#^Variable \$badgeDanger might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/theme/eldy/progress.inc.php - - - - message: '#^Variable \$badgeSuccess might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/progress.inc.php - - - - message: '#^Variable \$badgeWarning might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/progress.inc.php - - - - message: '#^Variable \$colorblind_deuteranopes_badgeDanger might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/progress.inc.php - - - - message: '#^Variable \$colorblind_deuteranopes_badgeSuccess might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/eldy/progress.inc.php - - message: '#^Variable \$menumanager might not be defined\.$#' identifier: variable.undefined @@ -26868,54 +27330,6 @@ parameters: count: 1 path: ../../../htdocs/theme/md/btn.inc.php - - - message: '#^Variable \$colorbackhmenu1 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$colorbacklinepair1 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$colortextbackhmenu might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$colortextlink might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$disableimages might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$left might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$right might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/theme/md/dropdown.inc.php - - - - message: '#^Variable \$path might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/md/flags-sprite.inc.php - - message: '#^Variable \$left might not be defined\.$#' identifier: variable.undefined @@ -26934,12 +27348,6 @@ parameters: count: 1 path: ../../../htdocs/theme/md/manifest.json.php - - - message: '#^Variable \$path might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/theme/md/progress.inc.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 68856768f08..1e2757154a5 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -7,7 +7,7 @@ * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2017 Rui Strecht * Copyright (C) 2023 Nick Fragoulis - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -467,9 +467,7 @@ print ''."\n"; print ''; print img_picto('', 'globe-americas', 'class="pictofixedwidth"'); print $form->select_country($mysoc->country_id, 'country_id', '', 0); -if ($user->admin) { - print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); -} +print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''."\n"; // Address diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index ab10c0d39ea..cc29686228d 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -260,7 +260,8 @@ $sql .= ", tms"; $sql .= ", entity"; $sql .= " FROM ".MAIN_DB_PREFIX."const"; $sql .= " WHERE entity IN (".$db->sanitize($user->entity.",".$conf->entity).")"; -if ((empty($user->entity) || $user->admin) && $debug) { +if ((empty($user->entity)/* || $user->admin */) && $debug) { + // empty } elseif (!GETPOST('visible') || GETPOST('visible') != 'all') { // to force for superadmin to debug $sql .= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits