Open grti-fr opened 1 year ago
Getting the same error on Dolibarr v18.0.2 when adding a new currency.
Fatal error: Uncaught TypeError: Unsupported operand types: string + int in X:------------\htdocs\admin\dict.php:863 Stack trace: #0 {main} thrown in X:-------\htdocs\admin\dict.php on line 863
Many functions are affected.
The bug only appears on PHP8 instances + Dolibarr v18 (I didn’t notice it elsewhere)
I’ve found two solutions:
Edit : also submited a fix in code. Waiting for approval
Many functions are affected.
The bug only appears on PHP8 instances + Dolibarr v18 (I didn’t notice it elsewhere)
I’ve found two solutions:
- Remain in PHP8 and fill in all form fields (put 0 instead of an empty field)
- Downgrade to PHP7
Edit : also submited a fix in code. Waiting for approval
FYI the first workaround above does not work when adding an absolute discount. A downgrade to PHP 7 is necessary in that case unless you are able to manually add entries into the database (not recommended especially for log keeping).
Thank you all for your replies. I've downgraded PHP to 7.4 and it works fine again.
Same error here on Dolibarr version 19.0.2 using PHP version 8.1.28 when adding an absolute discount. Is there a solution other than downgrading to PHP 7?
Ran into this issue today on 19.0.2 as well.
Bug
I can't add "absolute discount" (remise fixe) because of an error 500.
Similar to #23713
The problem occurs in all of my Dolibarr instances, even in my fresh install from 18.0.1
Error in PHP logs :
Environment Version
18.0.1, 18.0.2
Environment OS
o2switch
Environment Web server
No response
Environment PHP
8.1.23
Environment Database
mysql
Environment URL(s)
No response
Expected and actual behavior
No response
Steps to reproduce the behavior
Try to add an absolute discount for a customer
Attached files
No response