EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Throw deadlock exception in transaction
Yurii5afdbc665f3c
diff --git a/application/Espo/ORM/TransactionManager.php b/application/Espo/ORM/TransactionManager.phpindex 3efb4d3430..35b8b28d2b 100644--- a/application/Espo/ORM/TransactionManager.php+++ b/application/Espo/ORM/TransactionManager.php@@ -102,8 +102,7 @@ class TransactionManager$counter --;if ($counter === 0) {- /** @noinspection PhpUnhandledExceptionInspection */- throw $e->getPrevious() ?? new RuntimeException();+ throw $e;}return $this->runInternal($function, $counter);diff --git a/tests/unit/Espo/ORM/TransactionManagerTest.php b/tests/unit/Espo/ORM/TransactionManagerTest.phpindex 599b50bf50..10b77539eb 100644--- a/tests/unit/Espo/ORM/TransactionManagerTest.php+++ b/tests/unit/Espo/ORM/TransactionManagerTest.php@@ -295,7 +295,7 @@ class TransactionManagerTest extends TestCasethrow new DeadlockException(previous: new PDOException());});- } catch (PDOException) {+ } catch (DeadlockException) {$thrown = true;}