In uc_order_edit_products_form(), if there are no products, then this form element is created:

  $form['products'][]['remove'] = array(
    '#value' => t('This order contains no products.'),
    '#cell_attributes' => array('colspan' => 'full'),
  );

This causes problems if you are altering this form and looking for element_children($form['products']). Having an array entry gives a false positive and causes code to execute when not intended.

CommentFileSizeAuthor
#1 1292892-uc_order.admin_.patch497 bytessolotandem
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

solotandem’s picture

Status: Active » Needs review
FileSize
497 bytes

Attached patch replaces the form element with something simpler.

longwave’s picture

Status: Needs review » Fixed

Committed, thanks. Not needed in 7.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.