Преглед изворни кода

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;
                 }