Commit Graph

34655 Commits

Author SHA1 Message Date
Laurent Destailleur
769b682fd3 Update commonobject.class.php 2024-03-11 16:13:11 +01:00
terhoy
a8a2f0ff73 FIX: online signature partly fails if commercial proposal numbering contains a mask that’s includes a space (#28608) (#28742)
* FIX: online signature (#28608) Update signature.lib.php

If Commercial proposal numbering contains a mask that’s includes a space, that will affect the result of the online signature form. When generating the online signature form, the code in signature.lib.php line 77, will remove any existing space in the Commercial proposal numbering. The result is that the online signature form will miss data in field “Third-party” and “Amount”.

* FIX: online signature (#28608) Update payments.lib.php

If Commercial proposal numbering contains a mask that’s includes a space, that will affect the result of the online signature form. When generating the online signature form, the code in core/lib/payments.lib.ph, will remove any existing space in the Commercial proposal numbering.
2024-03-11 15:33:10 +01:00
Laurent Destailleur
1178b858d8 Merge branch 'develop' into fix/getChildrenOfLine/array_merge 2024-03-11 15:22:44 +01:00
Laurent Destailleur
39ea68ace4 Try fix phan 2024-03-11 15:20:56 +01:00
Laurent Destailleur
41078a9a46 Merge branch 'develop' into test/security_dol_eval_ob_cleanup_on_exception 2024-03-11 14:57:33 +01:00
Laurent Destailleur
be403024ed Try a fix for #28734 2024-03-11 14:40:36 +01:00
Laurent Destailleur
c192b8fccd Import menu before export 2024-03-11 14:33:02 +01:00
Laurent Destailleur
61d328093c Fix warnings 2024-03-11 14:28:55 +01:00
MDW
b72cf193c4 Fix some cases of PhanTypeSuspiciousStringExpression (#28751)
* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-11 14:01:28 +01:00
Laurent Destailleur
0f2121e3ba Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-11 13:46:08 +01:00
MDW
c333075776 Fix: getChildrenOfLine's use of includealltree as array
# Fix: getChildrenOfLine's use of includealltree as array

includealltree of getChildrenOfLine was used as an array, fixed
2024-03-11 13:41:02 +01:00
Laurent Destailleur
b7a246cedb Merge branch 'develop' into test/security_dol_eval_ob_cleanup_on_exception 2024-03-11 13:18:19 +01:00
MDW
dbfb1180ee Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions (#28749)
# Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions

Fix occurences of PhanPluginDuplicateIfStatements which are if statements where the
consecutive branches execute the same code, making it useles to test the condition
2024-03-11 12:58:51 +01:00
MDW
aee0509473 Qual: Force typing on variable fixing several phan notices (#28740)
* Qual: Force typing on variable fixing several phan notices

# Qual: Force typing on variable fixing several phan notices

Forcing DolibarrModules on $objMod after assignment to fix typing checks

* Qual: Fix typing on import_label/export_label
2024-03-11 12:56:55 +01:00
MDW
8602ca9885 Fix: implode->join and duplicated if condition (#28761)
* Fix: join->implode

# Fix: join->implode

Update new cases of join

* Fix: Duplicate if condition in if/else sequence

# Fix: Duplicate if condition in if/else sequence

Fixed repeated if condition and action
2024-03-11 12:55:55 +01:00
Philippe Grand
e25fb6f39b update code, better compliance with php8 (#28746)
* update code, better compliance with php8

* update code, better compliance with php8
2024-03-11 12:54:32 +01:00
Laurent Destailleur
ff0d147847 Merge branch 'develop' into test/security_dol_eval_ob_cleanup_on_exception 2024-03-11 12:48:31 +01:00
MDW
48073b85cb Fix: 'count' on scalar zip->numFiles (#28756) 2024-03-11 12:39:07 +01:00
Laurent Destailleur
f32bf4b3a7 Fix join -> implode 2024-03-11 12:38:21 +01:00
Laurent Destailleur
b3ee7c3853 Fix warning 2024-03-11 12:22:06 +01:00
Laurent Destailleur
898aebdbf8 Fix missing tooltip 2024-03-11 12:06:57 +01:00
Laurent Destailleur
002a4596df Fix warning 2024-03-11 12:00:39 +01:00
Laurent Destailleur
a327d39062 Fix warning 2024-03-11 11:39:51 +01:00
Laurent Destailleur
0887664888 NEW: All fetchAll() method now support the USF syntax. 2024-03-11 11:23:34 +01:00
Laurent Destailleur
c853a4687f Can delete last and criteria into the generic component. 2024-03-10 19:41:31 +01:00
Laurent Destailleur
4140f59335 Fix default value 2024-03-10 17:58:32 +01:00
Laurent Destailleur
453eb9c242 FIX: upload odt files should not start/end with space 2024-03-10 15:53:35 +01:00
Laurent Destailleur
ec1b8284c9 Rename files to use an english name 2024-03-10 15:52:29 +01:00
Laurent Destailleur
5a5fa9293f FIX: upload odt files should not start/end with space 2024-03-10 15:42:38 +01:00
MDW
101d56a2c1 Fix: Ob buffer cleanup on exception
# Fix: Ob buffer cleanup on exception

The OB buffer capture was incorrectly cleaned up on exception.
This fixes that.

Also modified the SecurityTest to enable running it standalone
2024-03-10 15:17:58 +01:00
Laurent Destailleur
51807de4ff Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-10 01:56:45 +01:00
MDW
6d9e7b8144 Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal (#28732)
* Fix: False positive for PhanTypeMismatchArgumentInternalProbablyReal

* Qual: phan: suppress false positive on ssl_set

* Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal

# Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal

PhanTypeMismatchArgumentInternalProbablyReal are fixed and reporting can
be enabled.

* Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal by improving typing

* Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal

# Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal

False positive detecting that  is not an int, rewriting to check
impact
2024-03-10 01:55:56 +01:00
Laurent Destailleur
429476e293 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-10 01:53:32 +01:00
MDW
37afba949e Fix most PhanTypeMismatchDimAssignment notices (#28739)
* Qual: Add typing to fix PhanTypeMismatchDimAssignment notice

* Fix: Initialise array for code in somme

* Qual: Update type hint for  argument in _Set_Format

* Qual: Update type hint for childtables

* Qual: Add typing to attributes

* Qual: Add typing for _msgContent

* Qual: Suppress PhanTypeMismatchDimAssignment

* Qual: Add typing for liste

* Qual: Add typing to fields

* Qual: Add typing hint for $objMod

* Qual: Modify assignment of array with bool keys for phan typing

Demonstration:
```
php -r '$a=[true=>"yes",false=>"no"];var_dump($a);'
# Result demonstrates bool keys are converted to int.
Command line code:1:
array(2) {
  [1] =>
  string(3) "yes"
  [0] =>
  string(2) "no"
}
```

* Qual: Add typing hint to indicate value is not null

* Force non-null type on $paramname

* Qual: Add typing hint to getCats()

* Update inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-10 01:53:04 +01:00
Laurent Destailleur
28df0ba1ab Fix doc 2024-03-10 01:49:56 +01:00
MDW
c95bab2818 Qual: Add check on addExtraField type argument (#28738)
* Qual: Add check on addExtraField type argument

# Qual: Add check on addExtraField type argument

Added a check on the type argument for addExtraField

* Qual: Update phan ignore with more specific name
2024-03-10 01:46:10 +01:00
Laurent Destailleur
cecd3bc1b6 FIX Picto in top menu 2024-03-09 23:47:28 +01:00
Laurent Destailleur
7e31aedf94 FIX Picto in top menu 2024-03-09 23:46:38 +01:00
MDW
d023b43da9 Fix: Ensure string type for urlencode() 2024-03-09 16:55:46 +01:00
MDW
c7b1a924c2 Fix: Ensure string type for urlencode() 2024-03-09 16:55:45 +01:00
MDW
8195fa49d9 Fix: Ensure string type for urlencode() 2024-03-09 16:55:44 +01:00
MDW
83d8f9cdd7 Fix: Ensure string type for urlencode() 2024-03-09 16:55:43 +01:00
MDW
e21c3df661 Fix: Ensure string type for urlencode() 2024-03-09 16:55:32 +01:00
MDW
0b19aa415c Fix: Initialise array before assigning values (#28728)
* Qual: Enable PhanUndeclaredVariableDim

# Qual: Enable PhanUndeclaredVariableDim

The notifications are fixed in the code so the detection no longer
needs to be suppressed in the default flow

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Qual: Add type hint to array to avoid phan notification

* Qual: Add type hint to array to avoid phan notification

* Qual: Enable PhanParamSpecial1 (all resolved)

* Qual: Ignore false PhanTypeArraySuspiciousNullable

* Qual: Improve typing to fix PhanTypeArraySuspicious

* Qual: Fix PhanTypeArraySuspicious by replacing null assignment with empty array

* Qual: Fix PhanTypeArraySuspicious by testing as instancof DebugBar

* Qual: Fix PhanTypeComparisonToArray with enhanced typing

* Qual: Fix PhanTypeComparisonToArray with enhanced typing

* Qual: Enable phan messages that no longer appear

* Qual: Exclude phan stubs from codesniffer ruleset
2024-03-09 16:32:02 +01:00
Laurent Destailleur
0c5280f7a5 Merge branch 'develop' into fix_element_type_part_04 2024-03-09 15:32:16 +01:00
Frédéric FRANCE
e00a9816f8 fix phpstan (#28727)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-03-09 14:48:06 +01:00
thibdrev
2cb4d40e5e qual: phan for functions.lib.php (#28655)
* Update card.php

* Update functions.lib.php

* Update card.php

* Update releve.php

* Update card-rec.php

* Update card.php

* Update prelevement.php

* Update card.php

* Update index.php

* Update index.php

* Update html.form.class.php

* Update card.php

* Update conferenceorbooth_card.php

* Update conferenceorbooth_contact.php

* Update conferenceorbooth_document.php

* Update conferenceorbooth_list.php

* Update conferenceorboothattendee_card.php

* Update conferenceorboothattendee_list.php

* Update shipment.php

* Update card.php

* Update card-rec.php

* Update card.php

* Update card.php

* Update document.php

* Update card.php

* Update comment.php

* Update element.php

* Update ganttview.php

* Update tasks.php

* Update comment.php

* Update contact.php

* Update document.php

* Update note.php

* Update task.php

* Update time.php

* Update card.php

* Update card.php

* Update bank.php

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-09 01:49:07 +01:00
Laurent Destailleur
31607f7239 Merge branch 'develop' into fix_element_type_part_04 2024-03-09 01:47:46 +01:00
Laurent Destailleur
f4713ad8a2 Merge branch 'develop' into fix_element_type_part_03 2024-03-09 01:47:38 +01:00
Laurent Destailleur
a8444e72cd Use user->hasRight 2024-03-09 01:45:31 +01:00