-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Uncaught TypeError: Unsupported operand types: string / int (societe.class.php:2370) #26205
Comments
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 |
…nt and string Dolibarr#26205 Happends with Dolibarr v18 + PHP8 This issue exists with many functions : Examples : https://www.dolibarr.org/forum/t/bom-error-500-uncaught-typeerror-unsupported-operand-types-string-int/24196/3 I had it with invoice => loan => make payment And also in bank reconciliation
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? |
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
The text was updated successfully, but these errors were encountered: