rabin 3 주 전
부모
커밋
22a7252738
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/Dever/App.php

+ 3 - 1
src/Dever/App.php

@@ -100,7 +100,9 @@ class App
                 $db->commit();
                 return $data;
             } catch (\Exception $e) {
-                $db->rollback();
+                if ($db->inTransaction()) {
+                    $db->rollback();
+                }
                 $data = $e->getTrace();
                 Dever::get(Debug::class)->trace($data);
                 throw new \Exception(json_encode($data));