lat9 / edit_orders

Edit Orders: Updates for continued operation on Zen Cart v1.5.8 and later
GNU General Public License v2.0
5 stars 9 forks source link

casting consistency...... #244

Open proseLA opened 1 month ago

proseLA commented 1 month ago

when looking at this code, some db values are cast and others are not: https://github.com/lat9/edit_orders/blob/769b2cc91c9a8b562cc440b7f33522db47e74fdc/YOUR_ADMIN/includes/functions/extra_functions/edit_orders_functions.php#L566-L589

in my experience, in the strict mode in mysql, having a blank for a mysql int or decimal var now results in a

PHP Fatal error: 1366:Incorrect decimal value: '' for column `myFreakinDatabase`.`orders_products`.`products_tax` at row 1 

we should definitely cast according the mysql field type.