浏览代码

fix one trans action error

stanley-king 3 年之前
父节点
当前提交
c869c03c83
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      helper/refill/RefillBase.php

+ 5 - 2
helper/refill/RefillBase.php

@@ -414,8 +414,11 @@ class RefillBase
                         Log::record(sprintf(__METHOD__ . "request time=%.6f", microtime(true) - $start), Log::DEBUG);
                     }
                 }
-                else {
-                    $trans->commit();
+                else
+                {
+                    if($fTrans) {
+                        $trans->commit();
+                    }
                     Log::record("{$result['msg']}",Log::ERR);
                     continue;
                 }