mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-24 13:54:28 +01:00
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>