Notice: Undefined variable: values in uc_roles_token_values, uc_payment_token_values, uc_file_token_values

Project:Ubercart Contributions
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

I think this may be a PHP5.3 notice bug - I have this in Ubercart core 6.x-2.4 (but couldn't figure how to file that on this site ). When uc_roles, payment and uc_files is enabled I get this error -
# Notice: Undefined variable: values in uc_payment_token_values() (line 153 of sites/all/modules/ubercart/payment/uc_payment/uc_payment.module).
# Notice: Undefined variable: values in uc_file_token_values() (line 688 of sites/all/modules/ubercart/uc_file/uc_file.module).
# Notice: Undefined variable: values in uc_roles_token_values() (line 592 of sites/all/modules/ubercart/uc_roles/uc_roles.module).

Looking at it, maybe $values is not declared as an array initially to keep PHP notice happy?

function uc_roles_token_values($type, $object = NULL) {
  switch ($type) {
    case 'uc_roles':
      $values['role-expiration-long'] = format_date($object->expiration, 'large');
      $values['role-expiration-medium'] = format_date($object->expiration, 'medium');
      $values['role-expiration-short'] = format_date($object->expiration, 'small');
      $values['role-name'] = check_plain(_uc_roles_get_name($object->rid));
      break;
  }

  return $values;
}
.....
function uc_file_token_values($type, $object = NULL) {
  switch ($type) {
    case 'uc_file':
      if (!empty($object)) {
        $values['file-downloads'] = theme('uc_file_downloads_token', $object);
      }
      break;
  }

  return $values;
}
.....
function uc_payment_token_values($type, $object = NULL) {
  switch ($type) {
    case 'order':
      $order = $object;
      $values['order-payment-method'] = _payment_method_data($order->payment_method, 'review');
      if (empty($values['order-payment-method'])) {
        $values['order-payment-method'] = _payment_method_data($order->payment_method, 'name');
      }

      $context = array(
        'revision' => 'formatted',
        'type' => 'amount',
      );
      $values['order-payment-balance'] = uc_price(uc_payment_balance($order), $context);
      break;
  }

  return $values;
}

I have other uc contrib modules running which could also maybe trigger this?

Version: 
Ubercart 2.x-dev