* FIX Invoice creation from template ignores extra fields set in form
* Fix Strict comparison using === between mixed and null will always evaluate to false
---------
Co-authored-by: Zakaria Boushaba <z.boushaba@vold.africa>
# Qual: Update logToCheckStyle (now extracts PHP Lint error msg)
logToCheckStyle was updated to extract PHP Lint (php -l) errors.
So they will show in the summary report and as annotations.
Removed an extra closing parenthesis in the user note permission check to fix a syntax error. Also added a new copyright line for 2026 and updated the parameters array formatting for consistency.
The full PHPStan analysis that runs on push to develop (and *.0 branches)
reported 5 new 'always true/false' errors, not caught by the per-PR diff
analysis and not yet in the baseline:
- htdocs/document.php: is_numeric() on the int-cast $entity is always true;
the redundant check is removed.
- htdocs/salaries/stats/index.php: $mode is hardcoded to 'statistics', so the
three view-switch button state comparisons are constant; replaced with their
literal results (1/1/2) and removed the now-unused $mode.
- htdocs/theme/md/style.css.php: method_exists($menumanager, 'showmenu') is
always true since $menumanager is a MenuManager; the redundant check is removed.
Behaviour is unchanged.
Several pages read a variable that is never defined on that page (copy/paste
from another page), so PHPStan level 10 flags 'Variable $x might not be
defined' and PHP 8 emits an undefined-variable warning with a null value:
- reception/card.php: $reception -> $object (matches the 10 other builddoc
blocks in the same file; otherwise the output PDF language is wrong)
- loan/payment/card.php: $object->id -> $id (page uses $id; matches the
adjacent enabled-button line)
- opensurvey/card.php: ConfirmRemovalOfPoll uses $id -> $numsondage
(otherwise the confirmation message placeholder is empty)
- opensurvey/results.php: guard $expiredate with !empty() (never defined on
this page; still falls back to $object->date_fin)
- projet/card.php: guard $morecss with !empty() (never defined here)
No behaviour change beyond removing the undefined-variable reads.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
In htdocs/product/stock/stocktransfer/stocktransfer_contact.php the
'addcontact' action assigns $result only inside 'if ($object->id > 0)', but
the success test 'if ($result >= 0)' runs unconditionally. On a POST with no
id/ref the object is not fetched ($object->id == 0), so $result is undefined
and 'null >= 0' evaluates to true, redirecting as if the contact was added.
Initialize $result = -1 at the start of the block so the missing-object case
takes the error branch instead of a false-success redirect. PHPStan level 10
also flagged 'Variable $result might not be defined' here.
* FIX: Escape session list fields
* FIX: Cast nullable session fields before escaping
* Update ChangeLog with new features and fixes
---------
Co-authored-by: f-hoedl <hoefla14@htl-kaindorf.ac.at>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>