overriding ubercart - add to cart button I try to override add to cart button with hook form alter in custom module with this function but I got an error Fatal error: fatal flex scanner internal error end of buffer missed in. What can be the problem?

function uc_button_form_alter($form_id, &amp;$form_state, $node) {
  if ($form_id == 'edit-submit-' . $node-&gt;nid) {
    $form['submit']['#attributes']=  array(
      'class' =&gt; 'node-add-to-cart',
      'xxx' =&gt; 'xxx',
    );
  }
};


Thank you
In D7, below is my solution for different product classes.

/* Overrides the Add to Cart form text*/
if ( !empty($form['nid']) ) {
  $node = $form['nid']['#value'];
}
else {
  $node = 0;
}
if (($form_id == 'uc_product_add_to_cart_form_'.$node) and ($form['node']['#value']-&gt;type =='uc_recurring_subscription')){
   $form['actions']['submit']['#value'] = t('Subscribe');     
}

if (($form_id == 'uc_product_add_to_cart_form_'.$node) and ($form['node']['#value']-&gt;type =='credit')){
   $form['actions']['submit']['#value'] = t('Buy');     
}


For regular product or just one product class, this should work.

/* Overrides the Add to Cart form text*/
if ( !empty($form['nid']) ) {
  $node = $form['nid']['#value'];
}
else {
  $node = 0;
}
if (($form_id == 'uc_product_add_to_cart_form_'.$node){
   $form['actions']['submit']['#value'] = t('Buy now');     
}