rabin 1 anno fa
parent
commit
d5f8fffd9c
1 ha cambiato i file con 9 aggiunte e 7 eliminazioni
  1. 9 7
      src/dai/seller/api/Test.php

+ 9 - 7
src/dai/seller/api/Test.php

@@ -36,13 +36,15 @@ class Test
     {
         while(1) {
             $order = Dever::db('order', 'seller')->find(array('seller_id' => 1, 'status' => 2));
-            $msg = 'error';
-            $update = array();
-            $update['official_msg'] = '';
-            $update['official_order_num'] = '';
-            $update['channel_callback'] = '';
-            $update['channel_callback_date'] = time();
-            Dever::load('order', 'seller')->notify($order, $msg, $update);
+            if ($order) {
+                $msg = 'error';
+                $update = array();
+                $update['official_msg'] = '';
+                $update['official_order_num'] = '';
+                $update['channel_callback'] = '';
+                $update['channel_callback_date'] = time();
+                Dever::load('order', 'seller')->notify($order, $msg, $update);
+            }
         };
     }
 }