Commit graph

14 commits

Author SHA1 Message Date
MDW
c4d2833421
fix: Replace db->escape with db->sanitize in SQL query construction (#39357)
Replaced all instances of `$this->db->escape($filtermode)` with `$this->db->sanitize($filtermode)` in SQL query construction across multiple classes to ensure proper SQL sanitization and prevent potential SQL injection vulnerabilities.
2026-08-04 18:40:04 +02:00
MDW
295bbc08ec
Qual: Fix PHPStan and Phan notices (#37950)
* Qual: Update GETPOST calls to handle hint array type

# Qual: Update GETPOST calls to handle hint array type

- Updated GETPOST calls for 'amounts' and 'multicurrency_amounts' to explicitly handle array inputs by adding the 'array' type parameter

This fixes PHPStan notices where expressions expect an array.

* Qual: Set type for status label mapping in LignePrelevement (PHPStan)

# Qual: Set type for status label mapping in LignePrelevement (PHPStan)

Added type hint to property `$labelStatus`

* Qual: Add type hints to datec and datep properties in PaymentSocialContribution

# Qual: Add type hints to datec and datep properties in PaymentSocialContribution

Added type hints to datec and datep properties.

* Qual: Add type hint to MIME mapping for image file extensions

# Qual: Add type hint to MIME mapping for image file extensions

Added type hint to `$image_types`

* Qual: Better type hint for getAllItemsLinkedByObjectID method

# Qual: Better type hint for getAllItemsLinkedByObjectID method

The return type annotation for the getAllItemsLinkedByObjectID method has been updated from 'array|int' to 'string[]|int'.

* Qual: Better type hint for fetchAll return value

# Qual: Better type hint for fetchAll return value

Suggest thet fetchAll returns list of objects

* Qual: Remove array from return value hint

* Qual: Add missing type hints to Notify

* Qual: Cast resource IDs to integers in getAllResourcesOfWorkstation

# Qual: Cast resource IDs to integers in getAllResourcesOfWorkstation

Ensure returned value is list of ints as parent::getAllItemsLinkedByObjectID does not ensure value type.

* Qual: Ensure correct return type for getAllGroupsOfWorkstation

* Qual: Improve typing hints

* Qual: Improve typing hints, ignore some notices

* Qual: Fix argument type

* Qual: Improve type hints

* Qual: Improve typing hints

* Qual: Add missing type hint

* Qual: Update Phan baseline

* Qual: Remove redundant exit (PHPStan, Phan)
2026-04-21 02:28:35 +02:00
Laurent Destailleur
35eb6853fd FIX Fetch of lead status 2026-03-05 12:45:25 +01:00
Laurent Destailleur
ed8fc3ab30 Fix CI 2025-11-26 01:45:45 +01:00
Laurent Destailleur
9abb1b7211 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-25 21:03:02 +01:00
Laurent Destailleur
e920456149 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-11-25 20:57:22 +01:00
Jon Bendtsen
5044b3a102
Qual: Undefined variable $errormessage in /var/www/html/core/customreports.php on line 951 (#36392)
* checking if variable is set before testing the contents

* more PHP warnings fixes detected during #35096

* using the fixed set above

* backport eldy's fix

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
2025-11-25 17:40:07 +01:00
Laurent Destailleur
85b03e227d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-24 19:13:58 +01:00
Laurent Destailleur
ca1a9c9155 Complete #35096 #36393 2025-11-24 19:13:13 +01:00
Laurent Destailleur
e707544cca Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-11-24 18:26:03 +01:00
Laurent Destailleur
112028aa7e FIX #35096 #36393 Add minimal fields required asthe class is used by
custom reports
2025-11-24 18:24:15 +01:00
Frédéric FRANCE
8d459e469d
clean code (#36260)
* clean code

* clean code

* clean code

* clean code

* fix $val might not be defined

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* fix phpstan errors reported

* ignore phpstan reported for later

* clean code

* clean code

* clean code

* clean

* test
2025-11-18 11:41:28 +01:00
Laurent Destailleur
fd5a42a612 Fix phan 2024-06-04 10:44:44 +02:00
Laurent Destailleur
c00ffbcd66 Fix error in generic report 2024-06-03 22:43:09 +02:00