I was able to recreate it, a walk around would be to replace line 737 with
This fixes the warnings without getting to the source of the empty value. Not sure if Not Empty is correct! there maybe a better answer.. or casting it to a float?Code:$freeShippingTotal += (!empty($shipping_attributes_price) ? $shipping_attributes_price : 0) ;
Recreated with a free shipping item with a cost, required text attribute without setting a price.
Heavy modified ZC1.5.7b and php7.4
Dave
Always forward thinking... Lost my mind!
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
PR coming... Looks like the use of an empty string ('') within the function called in the line before is a cause. Further it appears (using a php sandbox with PHP 7.4.16) that similar messages would be made from within the zen_get_discount_calc.
PR is: https://github.com/zencart/zencart/pull/4166
Haven't yet seen where the use of 0 will/may cause either a calculation issue or display of incorrect information where not desired. (E.g. showing the price of something as 0 where instead it should be "empty") Also haven't run this against the "upcoming" zen_not_null function in case the value returned is a zero which would be an integer...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Confirmed: the updates to includes/functions/functions_prices.php to fix this are staged in v157c, at:
https://github.com/zencart/zencart/r...ons_prices.php
which can safely be used in v157b
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Bookmarks