More casts needed for STRICT databases?
Starting to see logs like this:
--> PHP Fatal error: 1366:Incorrect decimal value: '' for column `dbname`.`paypal`.`mc_fee` at row 1 : ...
where mc_fee is ''. Casting this value to float would fix - wondering if this needs to be done for other decimal fields in this table.
Re: More casts needed for STRICT databases?
Rather that overall casting (which can introduce other issues), how about (a) determining why mc_fee was empty and (b) if that's a valid value, setting the value to 0 if it's empty().
Re: More casts needed for STRICT databases?
Interestingly, both techniques are used in this file includes/modules/payment/paypal/paypal_functions.php
But a cast of an array element before an insert is pretty unlikely to cause problems (unlike a random cast in the middle of a block of logic).