Open
Description
Details
The callback function give_stripe_form_add_data_tag_keys
incorrectly returns array|bool
for a filter that only supports an array
return type.
In a rare condition, such as the legacy Stripe front-end files being loaded when a Stripe gateway is not active, the early return value of false
breaks the output of the form HTML.
For example, see impress-org/givewp-next-gen#164.
Visuals
// give/includes/forms/template.php
/* var array $form_html_tags */
$form_html_tags = apply_filters( 'give_form_html_tags', (array) $form_html_tags, $form );
// give/includes/gateways/stripe/includes/filters.php
/* @return array|bool */
function give_stripe_form_add_data_tag_keys( $form_html_tags, $form ) {
if ( ! give_stripe_is_any_payment_method_active() ) {
return false;
}
// ...
return $form_html_tags;
}