- Issue created by @noahott
When creating or editing coupons, adding additional items to multi-value fields, like Applicable Products, results in an AJAX error:
ResponseText: TypeError: array_walk(): Argument #1 ($array) must be of type array, null given in array_walk() (line 1063 of /app/ sites/all/modules/uc_coupon/uc_coupon.admin.inc).
Using Drupal 7.99 and PHP 8,1, create a new coupon and click "Add more items" under Applicable Products.
This patch ensures all multi-value fields in $form data are initialized with an empty array to array_walk and array_filter do not throw errors.
Active
Code