Undefined variable '$form_state'

Created on 20 May 2020, over 5 years ago
Updated 18 August 2025, 18 days ago

In commerce_stripe.module, in the commerce_stripe_submit_form() function, there are references to $form_state, which is not defined anywhere in this function.

Also, it has global user; for no reason.

function commerce_stripe_submit_form($payment_method, $pane_values, $checkout_pane, $order) {
  global $user;
  $integration_type = !empty($payment_method['settings']['integration_type']) ? $payment_method['settings']['integration_type'] : STRIPE_DEFAULT_INTEGRATION;
  $order_wrapper = entity_metadata_wrapper('commerce_order', $order);
  $field = field_info_field('commerce_customer_address');
  $instance = field_info_instance('commerce_customer_profile', 'commerce_customer_address', 'billing');

  $available_countries = NULL;
  if (isset($form_state['input']['country'])) {
    $available_countries = array($form_state['input']['country'] => NULL);
  }
πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024