BOM Error 500 - Uncaught TypeError: Unsupported operand types: string * int

Hi
I have updated to the latest version 18.0.0 and when I try and add a new BOM, I get a server 500 HTTP error.
in the error_log file from the BOM folder, I see this error :

[25-Aug-2023 10:14:55 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /home/takeit6/domain.com/core/actions_addupdatedelete.inc.php:98
Stack trace:
#0 /home/takeit6/domain.com/bom/bom_card.php(126): include()
#1 {main}
thrown in /home/takeit6/domain.com/core/actions_addupdatedelete.inc.php on line 98

How to fix it ?
A fast support would be highly appreciated.

one update, on the 17.0.3, the BOM creation works ok.

Ok I see there is no response, how this forum works, where to place issues with the product and get some answers?
Any feedback, highly appreciated

Hello,

This forum is a community forum and Dolibarr is open source : We are all volunteers and spend our free time trying to answer.

If you want quick answer, you can always ask for a maintenance contract to a dolibarr preferred partner : Dolibarr Preferred Partners

Anyway, one thing to try is to upgrade to the V18.0.1

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

I’ll see if there’s a topic on github, as many functions are affected.

You can follow Uncaught TypeError: Unsupported operand types: string / int (societe.class.php:2370) · Issue #26205 · Dolibarr/dolibarr · GitHub

I submited a fix, but not sure if there are side effects.