diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 92a36f391..48a45170a 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3359,7 +3359,7 @@ EOF $oTagSet = $this->Get($sAttCode); if (is_null($oTagSet)) { - $oTagSet = new ormTagSet(get_class($this), $sAttCode); + $oTagSet = new ormTagSet(get_class($this), $sAttCode, $oAttDef->GetMaxItems()); } $oTagSet->ApplyDelta($value); $this->Set($sAttCode, $oTagSet); diff --git a/application/wizardhelper.class.inc.php b/application/wizardhelper.class.inc.php index a6ec6ff0e..1bb9a8575 100644 --- a/application/wizardhelper.class.inc.php +++ b/application/wizardhelper.class.inc.php @@ -177,7 +177,7 @@ class WizardHelper else if ($oAttDef instanceof AttributeTagSet) // AttributeDate is derived from AttributeDateTime { $value = json_decode($value, true); - $oTagSet = new ormTagSet(get_class($oObj), $sAttCode); + $oTagSet = new ormTagSet(get_class($oObj), $sAttCode, $oAttDef->GetMaxItems()); $oTagSet->SetValues($value['orig_value']); $oTagSet->ApplyDelta($value); $oObj->Set($sAttCode, $oTagSet); diff --git a/core/dbobject.class.php b/core/dbobject.class.php index c07e2fad7..d5793db2f 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -1334,7 +1334,7 @@ abstract class DBObject implements iDisplay { if (is_string($toCheck)) { - $oTag = new ormTagSet(get_class($this), $sAttCode); + $oTag = new ormTagSet(get_class($this), $sAttCode, $oAtt->GetMaxItems()); try { $oTag->SetValues(explode(' ', $toCheck)); diff --git a/core/ormtagset.class.inc.php b/core/ormtagset.class.inc.php index ab4cdfdf6..11f1ae3e1 100644 --- a/core/ormtagset.class.inc.php +++ b/core/ormtagset.class.inc.php @@ -227,7 +227,7 @@ final class ormTagSet extends ormSet */ public function GetDelta(ormSet $oOtherTagSet) { - $oTag = new ormTagSet($this->sClass, $this->sAttCode); + $oTag = new ormTagSet($this->sClass, $this->sAttCode, 0); // Set the initial value $aOrigTagCodes = $this->GetValues(); $oTag->SetValues($aOrigTagCodes); @@ -263,7 +263,7 @@ final class ormTagSet extends ormSet */ public function GetDeltaTags(ormTagSet $oOtherTagSet) { - $oTag = new ormTagSet($this->sClass, $this->sAttCode); + $oTag = new ormTagSet($this->sClass, $this->sAttCode, 0); // Set the initial value $aOrigTagCodes = $this->GetValues(); $oTag->SetValues($aOrigTagCodes); diff --git a/datamodels/2.x/itop-portal-base/portal/src/forms/objectformmanager.class.inc.php b/datamodels/2.x/itop-portal-base/portal/src/forms/objectformmanager.class.inc.php index 5997e5bda..d1f0b5a75 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/forms/objectformmanager.class.inc.php +++ b/datamodels/2.x/itop-portal-base/portal/src/forms/objectformmanager.class.inc.php @@ -1140,7 +1140,7 @@ class ObjectFormManager extends FormManager $oTagSet = $this->oObject->Get($sAttCode); if (is_null($oTagSet)) { - $oTagSet = new ormTagSet(get_class($this->oObject), $sAttCode); + $oTagSet = new ormTagSet(get_class($this->oObject), $sAttCode, $oAttDef->GetMaxItems()); } $oTagSet->ApplyDelta(json_decode($value, true)); $this->oObject->Set($sAttCode, $oTagSet);