Commit graph

151780 commits

Author SHA1 Message Date
Laurent Destailleur
1c435e2a67 Clean sql 2026-02-08 21:17:56 +01:00
Laurent Destailleur
102b65364c Avoid ( in sql 2026-02-08 20:57:11 +01:00
Laurent Destailleur
fe3314d07a Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 20:40:42 +01:00
Laurent Destailleur
79bf9a0a4b Add error message 2026-02-08 20:40:25 +01:00
minimexat
b74c6d3ee0
FIX PHP 8.1 undefined array key warnings in ProductCombination multiprices loop (#37142)
When PRODUIT_MULTIPRICES is enabled and a product variant's parent has
multiprices configured, the updateChildPrice() method iterates through
all price levels up to PRODUIT_MULTIPRICES_LIMIT. For price levels that
don't have prices defined, accessing $parent->multiprices[$i] and
related arrays directly causes 'undefined array key' warnings on
PHP 8.1+.

Changes:
- Add isset() check before comparing $parent->multiprices[$i]
- Use isset() ternary for $parent->multiprices_min[$i] (default: 0)
- Use !empty() for $parent->prices_by_qty_list[$i] check
- Use isset() ternary for $parent->multiprices_ttc[$i] (default: 0)
- Use isset() ternary for second $parent->multiprices[$i] (default: 0)

Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-08 20:02:02 +01:00
Eric - CAP-REL
b560a05e68
add fk_parent on group group for permission inheritance (#37152) 2026-02-08 20:01:25 +01:00
Laurent Destailleur
938f8b2d46 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 19:52:49 +01:00
Laurent Destailleur
c386f94fab Debug v23 - Filter on action type ko 2026-02-08 19:33:09 +01:00
Laurent Destailleur
1173164d7e Debug v23 - Filter on action type ko 2026-02-08 19:30:17 +01:00
Laurent Destailleur
8c5fe25137 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 19:04:03 +01:00
Laurent Destailleur
3b6c448787 Debug v23 - Min price was wrong in multicurrency mode 2026-02-08 18:52:24 +01:00
Laurent Destailleur
48254ef6d0 Comment 2026-02-08 17:51:20 +01:00
Laurent Destailleur
f4dc5dfee9 Fix CI 2026-02-08 17:51:08 +01:00
Laurent Destailleur
ba28d16da4 Sec: Add param $dolibarr_website_allow_custom_php to block by default
any PHP content in website module.
2026-02-08 17:41:42 +01:00
David Beniamine
de71085394
Ensure that if $object->members is not loaded either we do not send m… (#37126)
* Ensure that if $object->members is not loaded either we do not send members to LDAP or we explicitly loads them before according to LDAP configuration

* Fix typo
2026-02-08 15:39:27 +01:00
Laurent Destailleur
8feb5275ba Debug v23 2026-02-08 15:38:19 +01:00
MDW
1166dd305b
Qual: Update comments from French to English (#37097)
* Qual: Update comments from French to English

# Qual: Update comments from French to English

* Qual: Fix missing initialisations

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-08 15:29:53 +01:00
Laurent Destailleur
2b1d0e1012 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 15:28:31 +01:00
Laurent Destailleur
8a8ba06698 Fix CI 2026-02-08 15:28:19 +01:00
minimexat
f70eaae6f5
FIX #34342 PHP 8.1 undefined array key warnings in Product::getSellPrice() multiprices (#37144)
When using multiprices (PRODUIT_MULTIPRICES or
PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES), getSellPrice() accesses
$this->multiprices[$level], multiprices_ttc, multiprices_min,
multiprices_min_ttc, and multiprices_base_type arrays using the
buyer's price_level as key without checking if the key exists.

This causes 'undefined array key' warnings on PHP 8.1+ when a
third party has a price_level set but the product doesn't have
prices defined for that specific level.

Similarly, prices_by_qty array accesses for PRODUIT_CUSTOMER_PRICES_BY_QTY
and PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES modes could trigger
warnings when the array index doesn't exist.

Changes:
- Add isset() checks with safe defaults for all multiprices array
  accesses (0 for prices, 'HT' for price_base_type)
- Replace direct prices_by_qty access with !empty() checks

Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-08 15:08:58 +01:00
Laurent Destailleur
8d96ed3a03 Debug v23 2026-02-08 15:02:48 +01:00
Laurent Destailleur
28a7c69f11 Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 14:56:01 +01:00
Laurent Destailleur
4a7c6c6700 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-02-08 14:55:13 +01:00
Laurent Destailleur
9ec77dada2 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2026-02-08 14:54:15 +01:00
Laurent Destailleur
afc3879d84 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0 2026-02-08 14:53:59 +01:00
Laurent Destailleur
d15f196249 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 14:51:29 +01:00
Laurent Destailleur
f6ec5b44fe CI 2026-02-08 14:51:11 +01:00
Florian Hödl
4660d0eec9
FIX #37118 Add missing require_once for CMailFile and functions2 in advtargetemailing (#37136)
Co-authored-by: Florian Hödl <florian@hoedl.co>
2026-02-08 14:47:11 +01:00
minimexat
7496ec701c
FIX #36923 Fix undefined array key warnings in opensurvey create_survey.php (#37140)
The session variable initialization logic was inverted: it set variables
to null only when they already existed, instead of initializing them
when they were missing. This caused 'undefined array key' warnings on
PHP 8.1+ when accessing the poll creation form for the first time.

Changes:
- Inverted isset() condition to !isset() to properly initialize missing
  session variables
- Initialize to empty string instead of null
- Added missing session variables (allow_comments, allow_spy, champdatefin)
  to the initialization array
- Added dol_escape_htmltag() for title output (XSS hardening)

Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-08 14:46:02 +01:00
Vanyo
534995dd6c Initialize arrayforbutaction before hook (#37149) 2026-02-08 14:44:29 +01:00
Vanyo
1cd73239fc
Initialize arrayforbutaction before hook (#37149) 2026-02-08 14:44:15 +01:00
Laurent Destailleur
aa36309755 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 14:40:13 +01:00
Laurent Destailleur
c939f56b56 NEW Add method formatLogObject to allow logs in 1 line #37135 2026-02-08 14:39:46 +01:00
Alexandre SPANGARO
7bb57721bb
FIX Invoice - Don't show discount on credit note type (#37145) 2026-02-08 14:29:25 +01:00
Mathieu G.
3f412cf745
fix avoids undefined array key (#37103) 2026-02-08 14:28:09 +01:00
Laurent Destailleur
ce50e32a71 Fix regression 2026-02-08 14:25:27 +01:00
Laurent Destailleur
d0c5d523a3 FIX Show total on multicurrency only if currency are the same on all
lines
2026-02-08 13:59:19 +01:00
Laurent Destailleur
5e960ae089 FIX Show total on multicurrency only if currency are the same on all
lines
2026-02-08 13:57:11 +01:00
Laurent Destailleur
04c72eea0f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2026-02-08 13:15:16 +01:00
Laurent Destailleur
574b4b5d62 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into 23.0 2026-02-08 13:12:52 +01:00
Laurent Destailleur
01e947cfad Rename var 2026-02-08 13:10:29 +01:00
Laurent Destailleur
713918dadf Debug v23 2026-02-08 13:05:57 +01:00
Laurent Destailleur
eeae12ed63 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2026-02-08 13:05:32 +01:00
Laurent Destailleur
9fa2fd0b92 Debug v23 2026-02-08 13:04:23 +01:00
Laurent Destailleur
5c6bc657f4 CI 2026-02-08 12:58:22 +01:00
minimexat
02d0b6524c
FIX Add missing isset() check for $_GET['file'] in viewimage.php (#37141)
On line 65, $_GET['file'] is accessed without isset() check inside
the modulepart=='mycompany' condition. This causes an 'undefined array
key' warning on PHP 8.1+ when modulepart is 'mycompany' but no file
parameter is provided.

Note: GETPOST() is intentionally not used here as it is not available
before main.inc.php is loaded (see existing code comment).

Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
2026-02-08 03:06:36 +01:00
minimexat
61ece3d5c5
FIX Replace direct $_POST access with GETPOST() in origin/originid recovery paths (#37143)
When a create action fails and rolls back, several list/card pages
restore origin parameters by assigning $_POST values directly to
$_GET. This causes 'undefined array key' warnings on PHP 8.1+ if
the POST data is missing or malformed.

Replace raw $_POST['origin'] with GETPOST('origin', 'alpha') and
raw $_POST['originid'] with GETPOSTINT('originid') which safely
handle missing parameters.

Files fixed:
- htdocs/expedition/list.php
- htdocs/fourn/commande/list.php
- htdocs/commande/list.php
- htdocs/compta/facture/card.php
- htdocs/reception/list.php

These files had TODO-style comments ('Keep this ?', 'Keep GET and
POST here ?') indicating the pattern was already questionable.

Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
2026-02-08 03:05:47 +01:00
Laurent Destailleur
0111114502 Fix CI 2026-02-08 00:19:56 +01:00
Laurent Destailleur
9369f4aea3 Fix CI 2026-02-08 00:19:03 +01:00
adamhocini
79ba81a75d Correct linked_objects assignment for 'propal' #Wrong sourcetype 'commande' instead of 'propal' when creating recurring invoice template from invoice linked to proposal #37099 @defrance (#37112)
* Correct linked_objects assignment for 'propal'

@defrance Adam Hocini

* Refactor linked objects assignment for proposals

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-02-08 00:11:46 +01:00