Payment_total_type throwing json warning
-
We are not using payments in our form, but we’re running into a php notice that’s affecting our submission message:
Notice: Undefined index: payment_total_type in … plugins/ninja-forms/includes/Abstracts/MergeTags.php on line 73The code in question checks to see if “payment_total” is a key in the $subject field, but not “payment_total_type”:
if (
isset($subject['payment_total'])
&& $subject['payment_total_type'] == 'field'
&& ! is_numeric($subject['payment_total'])
&& ! strpos($subject['payment_total'], ':calc}')
)When I output the $subject array, there is no payment_total_type in the array, but there is an empty payment_total:
...
[payment_gateways] =>
[payment_total] =>
[tag] =>
...It appears that the isset($subject[“payment_total”]) is returning true, but since there’s not a key of “payment_total_type” in the $subject array, that is throwing the undefined index notice.
The topic ‘Payment_total_type throwing json warning’ is closed to new replies.