Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Don't fail upgrade due to integrity constraint violation.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpatrick committed Sep 30, 2015
1 parent 2b01824 commit 5df41a5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/controllers/components/UtilityComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,15 @@ public function installModule($moduleName)
}

$moduleDao->setCurrentVersion($version);
$moduleModel->save($moduleDao);
try {
$moduleModel->save($moduleDao);
} catch(Zend_Db_Statement_Exception $e) {
if ($e->getCode() === 23000) {
$this->getLogger()->debug("Failed to install ".$moduleName." due to integrity constraint violation.");
} else {
throw $e;
}
}

if ($uuid === false) {
if (file_exists(BASE_PATH.'/modules/'.$moduleName.'/AppController.php')) {
Expand Down

0 comments on commit 5df41a5

Please sign in to comment.