Laurent Destailleur
74b8162d22
Merge pull request #28700 from mdeweerd/urlencode/fixuptype
...
Fix: Ensure the argument type for urlencode is string
2024-03-12 14:43:41 +01:00
Laurent Destailleur
ee3fa7f643
Merge pull request #28776 from mdeweerd/fix/phpdoc1
...
Fix: PHPdoc and minor code changes from phpstan logs
2024-03-12 14:27:52 +01:00
Laurent Destailleur
53c3406d11
Merge branch 'develop' into fix_element_type_part_05
2024-03-12 14:22:25 +01:00
gdesnoues
c27f4e062f
Merge branch 'develop' into patch-1
2024-03-12 14:19:56 +01:00
Laurent Destailleur
d62ef14064
Merge pull request #28768 from mdeweerd/fix/PhanTypeMismatchDeclaredParamNullable
...
Fix: PhanTypeMismatchDeclaredParamNullable & enable detection
2024-03-12 14:19:41 +01:00
Francis Appels
6f1b184f17
Merge remote-tracking branch 'Dolibarr/develop' into develop_fix_delivery_note
2024-03-12 14:13:41 +01:00
Laurent Destailleur
949c885477
Merge branch 'develop' into fix/phpdoc1
2024-03-12 14:11:30 +01:00
gdesnoues
a75bc08d94
show image in a line description of a proposal PDF #28670
...
When you set FCKEDITOR_ENABLE_DETAILS_FULL to 1 you can add pictures in description proposal with the WYSIWYG bar.
Add preg_replace() to show this pictures in the PDF
2024-03-12 14:08:29 +01:00
Francis Appels
ba1ca6dc7d
module delivery_note not exist (no own module descriptor) is global MAIN_SUBMODULE_DELIVERY
2024-03-12 11:46:12 +01:00
Francis Appels
7ff68a5819
Fix shipping is not a delivery_note (sub module of shipping)
2024-03-12 11:07:18 +01:00
Frédéric FRANCE
d7517b5f20
Merge remote-tracking branch 'upstream/develop' into clean_mod_code
2024-03-12 09:25:53 +01:00
Laurent Destailleur
dcca7cc3f6
Better support for MAIN_OPTIMIZEFORTEXTBROWSER
2024-03-12 02:54:05 +01:00
Laurent Destailleur
56950673b8
Better support for MAIN_OPTIMIZEFORTEXTBROWSER
2024-03-12 02:41:47 +01:00
Laurent Destailleur
4f64c683ee
Better support for MAIN_OPTIMIZEFORTEXTBROWSER
2024-03-12 01:55:26 +01:00
Frédéric France
7ad8f6b074
clean code and phpdoc
2024-03-11 23:18:01 +01:00
Frédéric France
7fabf59b46
clean code and phpdoc
2024-03-11 23:13:30 +01:00
MDW
6e5c4ef851
Fix PHPDoc date_m typo
2024-03-11 21:43:50 +01:00
John BOTELLA
9aaae61c9a
Fix var
2024-03-11 16:49:46 +01:00
MDW
b7acea0ec4
Fix: PhanTypeMismatchDeclaredParamNullable notices
...
# Fix: PhanTypeMismatchDeclaredParamNullable notices
PHPDoc must indicate param is nullable if the default is null
with explicit typing.
(+Improved some other typing from generic Object to CommonObject).
2024-03-11 16:47:38 +01:00
Laurent Destailleur
93638f3980
Merge pull request #28667 from atm-john/fix_element_type_part_03
...
NEW : Factoring and Fix external module elementType limit - Part 03
2024-03-11 16:19:00 +01:00
Laurent Destailleur
38e67851bf
Merge pull request #28747 from mdeweerd/test/security_dol_eval_ob_cleanup_on_exception
...
Fix: Ob buffer cleanup on exception
2024-03-11 16:17:14 +01:00
John BOTELLA
84ac33e1f5
Merge branch 'develop' of github.com:Dolibarr/dolibarr into fix_element_type_part_06
2024-03-11 16:14:28 +01:00
John BOTELLA
12ae786b0d
Merge branch 'develop' into fix_element_type_part_05
2024-03-11 15:52:51 +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
41078a9a46
Merge branch 'develop' into test/security_dol_eval_ob_cleanup_on_exception
2024-03-11 14:57:33 +01:00
John BOTELLA
ed6874154d
Merge branch 'develop' into fix_element_type_part_05
2024-03-11 14:33:48 +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
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
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
a327d39062
Fix warning
2024-03-11 11:39:51 +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
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
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
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
abc57a767b
Merge branch 'develop' into fix_element_type_part_05
2024-03-09 15:23:23 +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
f1f9c2ee2e
Merge branch 'develop' into fix_element_type_part_05
2024-03-09 01:48:08 +01:00
Laurent Destailleur
f4713ad8a2
Merge branch 'develop' into fix_element_type_part_03
2024-03-09 01:47:38 +01:00
MDW
746ca01423
Fix: Correctly close active output buffer. ( #28723 )
...
# Fix: Correctly close active output buffer.
Use ob_get_clean(), not ob_get_contents() and ob_clean().
Tests were failing with:
FunctionsLibTest::testVerifCond with data set "Test that verifConf("0") returns false" ('0', false)
Test code or tested code did not (only) close its own output buffers
OK, but incomplete, skipped, or risky tests\!
Also refactored a test case to use a data provider which helped identify that it was related
to dol_eval.
2024-03-09 01:27:01 +01:00
MDW
4de7c67010
Qual: PhanCompatibleNegativeStringOffset must be suppressed ( #28720 )
...
# Qual: PhanCompatibleNegativeStringOffset must be suppressed
Apparently the PhanCompatibleNegativeStringOffset notice can not be avoided
through the '>=1' condition hint, so suppress it explicitly
2024-03-09 01:06:37 +01:00