diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index ddc3c6ccc4e..616b7756b5e 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -43,7 +43,7 @@ jobs: with: php-version: ${{ matrix.php-version }} coverage: none # disable xdebug, pcov - tools: phpstan:2.0, cs2pr + tools: phpstan, cs2pr extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap, mysql, pgsql, sqlite3, ldap, xml, mcrypt diff --git a/.github/workflows/phpstan_baseline.yml b/.github/workflows/phpstan_baseline.yml index 9cea77150dd..0b2a46dc65e 100644 --- a/.github/workflows/phpstan_baseline.yml +++ b/.github/workflows/phpstan_baseline.yml @@ -37,7 +37,7 @@ jobs: with: php-version: ${{ env.PHP_VERSION }} coverage: none # disable xdebug, pcov - tools: phpstan:2.0, cs2pr + tools: phpstan, cs2pr extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap, mysql, pgsql, sqlite3, ldap, xml, mcrypt env: diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index f227902c745..33207211b2b 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 - @@ -1206,6 +1200,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 +1236,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 +1272,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 @@ -1362,6 +1410,12 @@ 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 @@ -1380,6 +1434,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 +1491,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 +1524,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 +1554,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 +1584,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 +1620,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 +1644,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 +1698,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 +1800,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 +1878,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 +2070,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 +2388,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 +3711,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 +3816,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 +3882,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 +3972,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 +4080,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 +4104,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 +4212,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 +5040,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 +5268,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 +6264,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 +6528,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 +7494,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 +7962,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 +8334,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 +9084,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 +9330,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 +9762,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 +10014,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 +10104,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 +10152,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 +10243,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 +11259,7 @@ parameters: - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue - count: 2 + count: 3 path: ../../../htdocs/core/lib/functions.lib.php - @@ -10926,6 +11280,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 +11502,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 +11736,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 +11772,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 +12252,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 +15975,7 @@ parameters: - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue - count: 1 + count: 5 path: ../../../htdocs/expedition/card.php - @@ -15936,6 +16272,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 +17832,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 +19098,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 +19776,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 +20052,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 +20646,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 +20865,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 +21198,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 +21222,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 +21252,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 +22116,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 +23082,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 +23694,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 +24942,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 +25212,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 +25542,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 +26490,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 +26568,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 +26742,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 +27192,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 +27222,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 +27240,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 +27282,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 +27300,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/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 870475ca6b4..fe2952917f4 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,12 +1,12 @@ - * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2025 Alexandre Spangaro - * Copyright (C) 2022 Lionel Vessiller - * Copyright (C) 2016-2017 Laurent Destailleur - * Copyright (C) 2018-2025 Frédéric France - * Copyright (C) 2022 Progiseize - * Copyright (C) 2024 MDW +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2016 Florian Henry + * Copyright (C) 2013-2025 Alexandre Spangaro + * Copyright (C) 2022 Lionel Vessiller + * Copyright (C) 2016-2017 Laurent Destailleur + * Copyright (C) 2018-2025 Frédéric France + * Copyright (C) 2022 Progiseize + * Copyright (C) 2024 MDW * * 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 diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index b133e0399e4..54b6c227ed4 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -8,7 +8,7 @@ * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2017-2024 Frédéric France + * Copyright (C) 2017-2025 Frédéric France * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018-2024 Eric Seigne * Copyright (C) 2021 Gauthier VERDOL diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 207f7f97f3f..e64831600ce 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -2,7 +2,7 @@ /* Copyright (c) 2004-2011 Laurent Destailleur * Copyright (C) 2024 MDW * Copyright (C) 2024 Alexandre Spangaro - * 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 @@ -183,38 +183,41 @@ if ($mode) { while ($i < $num) { $obj = $db->fetch_object($resql); if ($mode == 'memberbycountry') { - $data[] = array('label' => (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), - 'label_en' => (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), - 'code' => $obj->code, - 'nb' => $obj->nb, + $data[] = array( + 'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'code' => (string) $obj->code, + 'nb' => (int) $obj->nb, 'lastdate' => $db->jdate($obj->lastdate), 'lastsubscriptiondate' => $db->jdate($obj->lastsubscriptiondate) ); } if ($mode == 'memberbyregion') { //+ $data[] = array( - 'label' => (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), - 'label_en' => (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), 'label2' => ($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), - 'nb' => $obj->nb, + 'nb' => (int) $obj->nb, 'lastdate' => $db->jdate($obj->lastdate), 'lastsubscriptiondate' => $db->jdate($obj->lastsubscriptiondate) ); } if ($mode == 'memberbystate') { - $data[] = array('label' => (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), - 'label_en' => (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + $data[] = array( + 'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), 'label2' => ($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), - 'nb' => $obj->nb, + 'nb' => (int) $obj->nb, 'lastdate' => $db->jdate($obj->lastdate), 'lastsubscriptiondate' => $db->jdate($obj->lastsubscriptiondate) ); } if ($mode == 'memberbytown') { - $data[] = array('label' => (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), - 'label_en' => (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), - 'label2' => ($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), - 'nb' => $obj->nb, + $data[] = array( + 'label' => (string) (($obj->code && $langs->trans("Country".$obj->code) != "Country".$obj->code) ? img_picto('', DOL_URL_ROOT.'/theme/common/flags/'.strtolower($obj->code).'.png', '', 1).' '.$langs->trans("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label_en' => (string) (($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code) ? $langsen->transnoentitiesnoconv("Country".$obj->code) : ($obj->label ? $obj->label : ''.$langs->trans("Unknown").'')), + 'label2' => (string) ($obj->label2 ? $obj->label2 : ''.$langs->trans("Unknown").''), + 'nb' => (int) $obj->nb, 'lastdate' => $db->jdate($obj->lastdate), 'lastsubscriptiondate' => $db->jdate($obj->lastsubscriptiondate) ); @@ -290,10 +293,10 @@ if (getDolGlobalString("GOOGLE_SHOW_COUNTRY_GRAPH") && $mode == 'memberbycountry $i = 0; foreach ($data as $val) { $valcountry = strtoupper($val['code']); // Should be ISO-3166 code (faster) - //$valcountry=ucfirst($val['label_en']); - if ($valcountry == 'Great Britain') { - $valcountry = 'United Kingdom'; - } // fix case of uk (when we use labels) + // $valcountry = ucfirst($val['label_en']); + // if ($valcountry == 'Great Britain') { + // $valcountry = 'United Kingdom'; + // } // fix case of uk (when we use labels) print "\tdata.setValue(".$i.", 0, \"".$valcountry."\");\n"; print "\tdata.setValue(".$i.", 1, ".$val['nb'].");\n"; // Google's Geomap only supports up to 400 entries diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 174e71a7516..aa60a5f7def 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -1,6 +1,6 @@ - * 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 @@ -149,9 +149,7 @@ print ''; print img_picto('', 'globe-americas', 'class="pictofixedwidth"'); print $form->select_country((GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : getDolGlobalString('MAIN_INFO_ACCOUNTANT_COUNTRY')), 'country_id'); -if ($user->admin) { - print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); -} +print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''."\n"; // State diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index ba4836f815c..1d1b6224841 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2021 Laurent Destailleur * Copyright (C) 2011-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 @@ -55,7 +55,7 @@ if (!isModEnabled('clicktodial')) { * Actions */ -if ($action == 'setvalue' && $user->admin) { +if ($action == 'setvalue'/* && $user->admin */) { $result1 = dolibarr_set_const($db, "CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", GETPOST("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS"), 'chaine', 0, '', $conf->entity); $result2 = dolibarr_set_const($db, "CLICKTODIAL_URL", GETPOST("CLICKTODIAL_URL"), 'chaine', 0, '', $conf->entity); $result3 = dolibarr_set_const($db, "CLICKTODIAL_KEY_FOR_CIDLOOKUP", GETPOST("CLICKTODIAL_KEY_FOR_CIDLOOKUP"), 'chaine', 0, '', $conf->entity); 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 diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index cd052b7dde0..6200addb6c1 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2418,7 +2418,7 @@ if ($id > 0) { $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->$value); } elseif (!empty($obj->code_iso) && $value == 'label' && $tabname[$id] == 'c_currencies') { $key = $langs->trans("Currency".strtoupper($obj->code_iso)); - $valuetoshow = ($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->$value); + $valuetoshow = (/* $obj->code_iso && */ $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->$value); } elseif ($value == 'libelle' && $tabname[$id] == 'c_typent') { $key = $langs->trans(strtoupper($obj->code)); $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->$value); diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 2fb95d6e572..7493ce50b23 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2021 Regis Houssin * Copyright (C) 2006-2020 Laurent Destailleur * Copyright (C) 2011-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 @@ -66,7 +66,7 @@ if ($reshook < 0) { } if (empty($reshook)) { - if ($action == 'setvalue' && $user->admin) { + if ($action == 'setvalue' /* && $user->admin */) { $error = 0; $db->begin(); diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index ddb19e167eb..2a73add4446 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -5,7 +5,7 @@ * Copyright (C) 2005 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-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 @@ -55,7 +55,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) { +if ($action == 'setvalue' /* && $user->admin */) { $error = 0; $db->begin(); diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index ac189dafe47..397f3e9997d 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -6,7 +6,7 @@ * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2024 MDW - * 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 @@ -58,7 +58,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) { +if ($action == 'setvalue' /* && $user->admin */) { $error = 0; $db->begin(); diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 12d6039ed96..8d0c2002815 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006-2008 Laurent Destailleur * Copyright (C) 2011-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 @@ -56,7 +56,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) { +if ($action == 'setvalue' /* && $user->admin */) { $error = 0; $db->begin(); diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index ebf2a10548b..f2872e743fd 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2011-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 @@ -57,7 +57,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) { +if ($action == 'setvalue' /* && $user->admin */) { $error = 0; $db->begin(); diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index af24762a8a9..d59654a0469 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -7,7 +7,7 @@ * Copyright (C) 2011-2016 Juanjo Menent * Copyright (C) 2019 Abbes Bahfir * Copyright (C) 2024 MDW - * 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 @@ -58,7 +58,7 @@ $action = GETPOST('action', 'aZ09'); * Actions */ -if ($action == 'setvalue' && $user->admin) { +if ($action == 'setvalue' /* && $user->admin */) { $error = 0; $db->begin(); diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index e91f1058b3d..df3946e1bf7 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -3,7 +3,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016 Jonathan TISSEAU - * 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 @@ -362,7 +362,7 @@ if ($action == 'edit') { print ''.$langs->trans("MAIN_MAIL_SENDMODE").''; // SuperAdministrator access only - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING', $listofmethods, getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')); } else { $text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')]; @@ -395,7 +395,7 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { print ''; print ''; print '' . $langs->trans("SeeLocalSendMailSetup") . ''; @@ -427,7 +427,7 @@ if ($action == 'edit') { } print ''; // SuperAdministrator access only - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { print ''; print ''; print '' . $langs->trans("SeeLocalSendMailSetup") . ''; @@ -444,7 +444,7 @@ if ($action == 'edit') { if (!empty($conf->use_javascript_ajax) || in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) { print ''.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING'; - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { // Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case) print ' '; print ''; @@ -473,7 +473,7 @@ if ($action == 'edit') { $mainstmpid = getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING'); print '' . $langs->trans("MAIN_MAIL_SMTPS_ID") . ''; // SuperAdministrator access only - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -488,7 +488,7 @@ if ($action == 'edit') { $mainsmtppw = getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING'); print '' . $langs->trans("MAIN_MAIL_SMTPS_PW") . ''; // SuperAdministrator access only - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { print ''; } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -503,7 +503,7 @@ if ($action == 'edit') { print ''.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").''; // SuperAdministrator access only - if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) { + if (!isModEnabled('multicompany') || (/* $user->admin && */ !$user->entity)) { // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING')); } else { diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 994a47ccd73..66b558fb005 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2019 JC Prieto - * Copyright (C) 2022-2024 Frédéric France + * Copyright (C) 2022-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -535,7 +535,7 @@ class Account extends CommonObject * @param int $fk_bank To search using bank transaction id * @param int $url_id To search using link to * @param string $type To search using type - * @return int<-1,-1>|array Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error + * @return int<-1,-1>|array Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error */ public function get_url($fk_bank = 0, $url_id = 0, $type = '') {