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

refactor for undefined price_calc_method #182

Closed proseLA closed 3 years ago

proseLA commented 3 years ago

i am not sure other the array_merge, why this section of code is within the foreach loop starting at line 368:

https://github.com/lat9/edit_orders/blob/82f100bbd8b79dcc5c85b1a5c34a9d8aba6d662c/YOUR_ADMIN/edit_orders.php#L453-L462

it can lead to a situation (seem out in the wild) where $price_calc_method is undefined here, as it is outside of the loop:

https://github.com/lat9/edit_orders/blob/82f100bbd8b79dcc5c85b1a5c34a9d8aba6d662c/YOUR_ADMIN/edit_orders.php#L498

lat9 commented 3 years ago

Good point, the determination of the $price_calc_method should be done outside the loop and then used for each product being processed.