@@ -122,8 +122,9 @@ discard block |
||
122 | 122 | ]; |
123 | 123 | |
124 | 124 | } catch (\Exception $e) { |
125 | - if ($this->manager->getConnection()->isTransactionActive()) |
|
126 | - $this->manager->getConnection()->rollBack(); |
|
125 | + if ($this->manager->getConnection()->isTransactionActive()) { |
|
126 | + $this->manager->getConnection()->rollBack(); |
|
127 | + } |
|
127 | 128 | |
128 | 129 | throw new \InvalidArgumentException($e->getMessage()); |
129 | 130 | } |
@@ -157,8 +158,9 @@ discard block |
||
157 | 158 | return true; |
158 | 159 | |
159 | 160 | } catch (\Exception $e) { |
160 | - if ($this->manager->getConnection()->isTransactionActive()) |
|
161 | - $this->manager->getConnection()->rollBack(); |
|
161 | + if ($this->manager->getConnection()->isTransactionActive()) { |
|
162 | + $this->manager->getConnection()->rollBack(); |
|
163 | + } |
|
162 | 164 | |
163 | 165 | throw new \InvalidArgumentException($e->getMessage()); |
164 | 166 | } |