Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX php8: Fatal when empty $tmpvat is an empty string #29451

Merged

Conversation

atm-florianm
Copy link
Contributor

Issue description

PHP8 throws a TypeError when an empty string is used in basic arithmetic operations, where PHP7 would only issue a warning and silently convert to 0.

In some cases, $tva_tx is an empty string (I don't remember the precise context as it happened to a client several weeks ago).
This results in $tmptva being also an empty string and causes a fatal error.

…ersion to '0' when used in arithmetic operations)
@eldy eldy merged commit 0a2699f into Dolibarr:17.0 Apr 24, 2024
3 checks passed
@atm-florianm atm-florianm deleted the FIX_fatal_php8_when_tmpvat_is_empty_string branch April 24, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants