Fix AttributeSet wrong error on number of tags in creation

This commit is contained in:
Eric
2018-12-03 11:01:54 +01:00
parent c15d626095
commit aca11ac966
5 changed files with 27 additions and 8 deletions

View File

@@ -3370,7 +3370,7 @@ EOF
$oSet = $this->Get($sAttCode);
if (is_null($oSet))
{
$oSet = new ormSet(get_class($this), $sAttCode);
$oSet = new ormSet(get_class($this), $sAttCode, $oAttDef->GetMaxItems());
}
$oSet->ApplyDelta($value);
$this->Set($sAttCode, $oSet);
@@ -3427,7 +3427,14 @@ EOF
{
$aFinalValues[$sAttCode] = $aValues[$sAttCode];
}
$this->UpdateObjectFromArray($aFinalValues);
try
{
$this->UpdateObjectFromArray($aFinalValues);
}
catch (CoreException $e)
{
$aErrors[] = $e->getMessage();
}
if (!$this->IsNew()) // for new objects this is performed in DBInsertNoReload()
{
InlineImage::FinalizeInlineImages($this);
@@ -3660,8 +3667,14 @@ EOF
$aFinalValues[$sAttCode] = $aValues[$sAttCode];
}
}
$this->UpdateObjectFromArray($aFinalValues);
try
{
$this->UpdateObjectFromArray($aFinalValues);
}
catch (CoreException $e)
{
$aErrors[] = $e->getMessage();
}
return $aErrors;
}