diff --git a/uc_taxes/uc_taxes.module b/uc_taxes/uc_taxes.module
index a1d8322..a0d7698 100644
--- a/uc_taxes/uc_taxes.module
+++ b/uc_taxes/uc_taxes.module
@@ -243,12 +243,12 @@ function uc_line_item_tax_subtotal($op, $order) {
   $has_taxes = FALSE;
   $different = FALSE;
 
-  if (is_array($order->products)) {
+  if (isset($order->products) && is_array($order->products)) {
     foreach ($order->products as $item) {
       $amount += $item->price * $item->qty;
     }
   }
-  if (is_array($order->line_items)) {
+  if (isset($order->line_items) && is_array($order->line_items)) {
     foreach ($order->line_items as $key => $line_item) {
       if ($line_item['type'] == 'subtotal') {
         continue;
