N°5547 - Object deletion fails if friendlyname too long (#529)

This commit is contained in:
Anne-Catherine
2024-02-27 17:59:37 +01:00
committed by GitHub
parent 82e19f6eca
commit 86bf6ba0b0
3 changed files with 108 additions and 7 deletions

View File

@@ -335,7 +335,7 @@ abstract class CMDBObject extends DBObject
$oMyChangeOp->Set("objclass", MetaModel::GetRootClass(get_class($this)));
$oMyChangeOp->Set("objkey", $objkey);
$oMyChangeOp->Set("fclass", get_class($this));
$oMyChangeOp->Set("fname", substr($this->GetRawName(), 0, 255)); // Protect against very long friendly names
$oMyChangeOp->SetTrim("fname", $this->GetRawName()); // Protect against very long friendly names
$iId = $oMyChangeOp->DBInsertNoReload();
}