Index: uc_attribute/uc_attribute.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_attribute/uc_attribute.module,v
retrieving revision 1.12.2.10
diff -u -p -r1.12.2.10 uc_attribute.module
--- uc_attribute/uc_attribute.module	2 Jan 2009 20:18:43 -0000	1.12.2.10
+++ uc_attribute/uc_attribute.module	8 Jan 2009 22:21:06 -0000
@@ -242,7 +242,7 @@ function uc_attribute_theme() {
 function uc_attribute_form_alter(&$form, &$form_state, $form_id) {
   if (strpos($form_id, 'add_to_cart_form') || strpos($form_id, 'add_product_form')) {
     // If the node has a product list, add attributes to them
-    if (count(element_children($form['products']))) {
+    if (isset($form['products']) && count(element_children($form['products']))) {
       foreach (element_children($form['products']) as $key) {
         $form['products'][$key]['attributes'] = _uc_attribute_alter_form(node_load($key));
         if (is_array($form['products'][$key]['attributes'])) {
Index: uc_order/uc_order.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_order/uc_order.module,v
retrieving revision 1.12.2.11
diff -u -p -r1.12.2.11 uc_order.module
--- uc_order/uc_order.module	2 Jan 2009 20:18:40 -0000	1.12.2.11
+++ uc_order/uc_order.module	8 Jan 2009 22:21:06 -0000
@@ -340,6 +340,7 @@ function uc_order_theme() {
  * Implementation of hook_token_values(). (token.module)
  */
 function uc_order_token_values($type, $object = NULL) {
+  $values = array();
   switch ($type) {
     case 'order':
       $order = $object;
@@ -402,6 +403,7 @@ function uc_order_token_values($type, $o
  * Implementation of hook_token_list(). (token.module)
  */
 function uc_order_token_list($type = 'all') {
+  $tokens = array();
   if ($type == 'order' || $type == 'ubercart' || $type == 'all') {
     $tokens['order']['new-username'] = t('New username associated with an order if applicable.');
     $tokens['order']['new-password'] = t('New password associated with an order if applicable.');
Index: uc_product/uc_product.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_product/Attic/uc_product.admin.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 uc_product.admin.inc
--- uc_product/uc_product.admin.inc	2 Jan 2009 20:18:43 -0000	1.1.2.7
+++ uc_product/uc_product.admin.inc	8 Jan 2009 22:21:06 -0000
@@ -30,7 +30,7 @@ function uc_product_administration() {
   $table = tapir_get_table('uc_product_table', $nids);
 
   // Display the product table and pager if necessary.
-  $output .= drupal_render($table) . theme('pager');
+  $output = drupal_render($table) . theme('pager');
 
   return $output;
 }
@@ -564,11 +564,15 @@ function uc_product_image_defaults() {
  * @see uc_product_class_form_submit()
  */
 function uc_product_class_form($form_state, $class = NULL) {
-  if ($class) {
-    drupal_set_title(check_plain($class->name));
+  if (!empty($class)) {
+    $classname = $class->name;
+    $classdesc = $class->description;
+    drupal_set_title(check_plain($classname));
     $form['pcid'] = array('#type' => 'hidden', '#value' => $class->pcid);
   }
   else {
+    $classname = '';
+    $classdesc = '';
     $form['pcid'] = array('#type' => 'textfield',
       '#title' => t('Class ID'),
       '#required' => TRUE,
@@ -579,14 +583,14 @@ function uc_product_class_form($form_sta
   $form['name'] = array(
     '#type' => 'textfield',
     '#title' => t('Class name'),
-    '#default_value' => $class->name,
+    '#default_value' => $classname,
     '#required' => TRUE,
   );
   $form['description'] = array(
     '#type' => 'textarea',
     '#title' => t('Description'),
     '#description' => t('This text describes the content type created for this product class to administrators.'),
-    '#default_value' => $class->description,
+    '#default_value' => $classdesc,
   );
   $form['submit'] = array(
     '#type' => 'submit',
Index: uc_product/uc_product.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_product/uc_product.module,v
retrieving revision 1.14.2.12
diff -u -p -r1.14.2.12 uc_product.module
--- uc_product/uc_product.module	2 Jan 2009 20:18:43 -0000	1.14.2.12
+++ uc_product/uc_product.module	8 Jan 2009 22:21:06 -0000
@@ -162,9 +162,10 @@ function uc_product_menu() {
  */
 function uc_product_help($path, $arg) {
   // Do things here later. Figure out what you need to say for each section.
+  $output = '';
   switch ($path) {
     case 'admin/settings/module#description':
-      $output = t('Create products for sale in an online store.');
+      $output .= t('Create products for sale in an online store.');
       break;
     default:
       $output = '';
@@ -474,7 +475,7 @@ function uc_product_form(&$node) {
   $form['base']['model'] = array('#type' => 'textfield',
     '#title' => t('SKU'),
     '#required' => TRUE,
-    '#default_value' => $node->model,
+    '#default_value' => isset($node->model) ? $node->model : '',
     '#description' => t('Product SKU/model.'),
     '#weight' => 0,
     '#size' => 32,
@@ -489,7 +490,7 @@ function uc_product_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('List price'),
     '#required' => FALSE,
-    '#default_value' => $node->list_price,
+    '#default_value' => isset($node->list_price) ? $node->list_price : 0,
     '#description' => t('The listed MSRP.'),
     '#weight' => 0,
     '#size' => 20,
@@ -501,7 +502,7 @@ function uc_product_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('Cost'),
     '#required' => FALSE,
-    '#default_value' => $node->cost,
+    '#default_value' => isset($node->cost) ? $node->cost : 0,
     '#description' => t("Your store's cost."),
     '#weight' => 1,
     '#size' => 20,
@@ -513,7 +514,7 @@ function uc_product_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('Sell price'),
     '#required' => TRUE,
-    '#default_value' => $node->sell_price,
+    '#default_value' => isset($node->sell_price) ? $node->sell_price : 0,
     '#description' => t('Customer purchase price.'),
     '#weight' => 2,
     '#size' => 20,
@@ -535,7 +536,7 @@ function uc_product_form(&$node) {
   );
   $form['base']['weight']['weight'] = array('#type' => 'textfield',
     '#title' => t('Weight'),
-    '#default_value' => $node->weight,
+    '#default_value' => isset($node->weight) ? $node->weight : 0,
     '#size' => 10,
     '#maxlength' => 15,
   );
@@ -547,7 +548,7 @@ function uc_product_form(&$node) {
   );
   $form['base']['weight']['weight_units'] = array('#type' => 'select',
     '#title' => t('Unit of measurement'),
-    '#default_value' => $node->weight_units ? $node->weight_units : variable_get('uc_weight_unit', 'lb'),
+    '#default_value' => isset($node->weight_units) ? $node->weight_units : variable_get('uc_weight_unit', 'lb'),
     '#options' => $units,
   );
   $form['base']['dimensions'] = array('#type' => 'fieldset',
@@ -564,32 +565,32 @@ function uc_product_form(&$node) {
       'cm' => t('Centimeters'),
       'mm' => t('Millimeters'),
     ),
-    '#default_value' => $node->length_units ? $node->length_units : variable_get('uc_length_unit', 'in'),
+    '#default_value' => isset($node->length_units) ? $node->length_units : variable_get('uc_length_unit', 'in'),
   );
   $form['base']['dimensions']['length'] = array('#type' => 'textfield',
     '#title' => t('Length'),
-    '#default_value' => $node->length,
+    '#default_value' => isset($node->length) ? $node->length : '',
     '#size' => 10,
   );
   $form['base']['dimensions']['width'] = array('#type' => 'textfield',
     '#title' => t('Width'),
-    '#default_value' => $node->width,
+    '#default_value' => isset($node->width) ? $node->width : '',
     '#size' => 10,
   );
   $form['base']['dimensions']['height'] = array('#type' => 'textfield',
     '#title' => t('Height'),
-    '#default_value' => $node->height,
+    '#default_value' => isset($node->height) ? $node->height : '',
     '#size' => 10,
   );
   $form['base']['pkg_qty'] = array('#type' => 'textfield',
     '#title' => t('Package quantity'),
-    '#default_value' => $node->pkg_qty ? $node->pkg_qty : 1,
+    '#default_value' => isset($node->pkg_qty) ? $node->pkg_qty : 1,
     '#description' => t('For a package containing only this product, how many are in it?'),
     '#weight' => 25,
   );
   $form['base']['default_qty'] = array('#type' => 'textfield',
     '#title' => t('Default quantity to add to cart'),
-    '#default_value' => !is_null($node->default_qty) ? $node->default_qty : 1,
+    '#default_value' => isset($node->default_qty) ? $node->default_qty : 1,
     '#description' => t('Leave blank or zero to disable the quantity field next to the add to cart button, if it is enabled <a href="!settings_url">in general</a>. If it is disabled, this field is ignored.', array('!settings_url' => url('admin/store/settings/products/edit'))),
     '#weight' => 27,
     '#size' => 5,
@@ -1409,7 +1410,7 @@ function theme_uc_product_image($images,
   $image_widget = uc_product_get_image_widget();
   $image_widget_func = $image_widget['callback'];
 
-  $first = array_shift($images);
+  $first = array_merge(array('filepath' => '', 'title' => '', 'alt' => ''), array_shift($images));
   $output = '<div class="product-image">';
   if ($image_widget) {
     $output .= '<a href="'. check_url(file_create_url($first['filepath'])) .'" title="'. $first['title'] .'"'. $image_widget_func($rel_count) .'>';
@@ -1422,7 +1423,9 @@ function theme_uc_product_image($images,
     $output .= '</a>';
   }
   $output .= '<br />';
+  $defaults = array('filepath'=>'','alt'=>'','title'=>'');
   foreach ($images as $thumbnail) {
+    $thumbnail = array_merge($defaults, $thumbnail);
     if ($image_widget) {
       $output .= '<a href="'. check_url(file_create_url($thumbnail['filepath'])) .'" title="'. $thumbnail['title'] .'"'. $image_widget_func($rel_count) .'>';
     }
Index: uc_store/uc_store.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_store/uc_store.module,v
retrieving revision 1.14.2.11
diff -u -p -r1.14.2.11 uc_store.module
--- uc_store/uc_store.module	2 Jan 2009 20:18:40 -0000	1.14.2.11
+++ uc_store/uc_store.module	8 Jan 2009 22:21:06 -0000
@@ -805,6 +805,8 @@ function uc_currency_format($value, $sig
   if ($value < 0) {
     $value = abs($value);
     $format = '-';
+  } else {
+    $format = '';
   }
 
   if ($sign && !variable_get('uc_sign_after_amount', FALSE)) {
