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

Correct PHP Notices thrown by ot_shipping's constructor #172

Closed lat9 closed 3 years ago

lat9 commented 4 years ago

Seeing logs similar to the following on each EO page-load:

[24-Sep-2020 13:23:08 Europe/Berlin] Request URI: /zc156posm/gRoan-Dsw-Habit/edit_orders.php?page=1&oID=119&action=update_order, IP address: ::1
#1  ot_shipping->__construct() called at [C:\xampp\htdocs\zc156posm\includes\classes\order_total.php:51]
#2  order_total->__construct() called at [C:\xampp\htdocs\zc156posm\gRoan-Dsw-Habit\includes\functions\extra_functions\edit_orders_functions.php:1381]
#3  eo_update_database_order_totals() called at [C:\xampp\htdocs\zc156posm\gRoan-Dsw-Habit\edit_orders.php:648]
--> PHP Notice: Undefined index: flat in C:\xampp\htdocs\zc156posm\includes\modules\order_total\ot_shipping.php on line 60.

[24-Sep-2020 13:23:08 Europe/Berlin] Request URI: /zc156posm/gRoan-Dsw-Habit/edit_orders.php?page=1&oID=119&action=update_order, IP address: ::1
#1  ot_shipping->__construct() called at [C:\xampp\htdocs\zc156posm\includes\classes\order_total.php:51]
#2  order_total->__construct() called at [C:\xampp\htdocs\zc156posm\gRoan-Dsw-Habit\includes\functions\extra_functions\edit_orders_functions.php:1381]
#3  eo_update_database_order_totals() called at [C:\xampp\htdocs\zc156posm\gRoan-Dsw-Habit\edit_orders.php:648]
--> PHP Notice: Trying to get property 'tax_class' of non-object in C:\xampp\htdocs\zc156posm\includes\modules\order_total\ot_shipping.php on line 60.

The EO processing will be updated to provide a shipping-method 'stub' to tell the shipping order-total that there's no tax processing to be performed, e.g. the tax rate is 0. That will enable EO to continue to provide its possible override of any shipping-tax rate based on admin entry.