🎨 Use finally instead of duplicating lines

see http://php.net/manual/fr/language.exceptions.php#language.exceptions.finally : finally was added in PHP 5.5
This commit is contained in:
Pierre Goiffon
2019-03-07 16:03:51 +01:00
parent 065895aa73
commit 7ad9b9dd08

View File

@@ -3746,17 +3746,19 @@ EOF
{
// Invoke extensions after the update (could be before)
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$oExtensionInstance->OnDBUpdate($this, self::GetCurrentChange());
}
} catch (Exception $e)
}
catch (Exception $e)
{
unset($aUpdateReentrance[$sKey]);
throw $e;
}
unset($aUpdateReentrance[$sKey]);
finally
{
unset($aUpdateReentrance[$sKey]);
}
return $res;
}