mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 00:58:48 +02:00
Fix throw inside transaction without rollback
This commit is contained in:
@@ -916,11 +916,11 @@ EOF
|
||||
{
|
||||
try
|
||||
{
|
||||
CMDBSource::Query('START TRANSACTION');
|
||||
if (!empty($aErrors))
|
||||
{
|
||||
throw new CoreCannotSaveObjectException(array('id' => $oObj->GetKey(), 'class' => $sClass, 'issues' => $aErrors));
|
||||
}
|
||||
CMDBSource::Query('START TRANSACTION');
|
||||
$oObj->DBUpdate();
|
||||
CMDBSource::Query('COMMIT');
|
||||
$sMessage = Dict::Format('UI:Class_Object_Updated', MetaModel::GetName(get_class($oObj)), $oObj->GetName());
|
||||
|
||||
Reference in New Issue
Block a user