Skip to content
Browse files

fixed usage of getTransactionManager()

  • Loading branch information...
1 parent e8994c3 commit d2056a3281a217090642dd8e7b887618c85890e4 @lsmith77 lsmith77 committed Sep 11, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Doctrine/ODM/PHPCR/UnitOfWork.php
View
6 lib/Doctrine/ODM/PHPCR/UnitOfWork.php
@@ -771,9 +771,11 @@ public function flush($persist_to_backend = true)
$session = $this->dm->getPhpcrSession();
if ($persist_to_backend) {
- $utx = $session->getWorkspace()->getTransactionManager();
- if ($utx) {
+ try {
+ $utx = $session->getWorkspace()->getTransactionManager();
$utx->begin();
+ } catch (\PHPCR\UnsupportedRepositoryOperationException $e) {
+ $utx = null;
}
}

0 comments on commit d2056a3

Please sign in to comment.
Something went wrong with that request. Please try again.