N°8807 - Error saving when a DoCheckToWrite check of the linkset fails

This commit is contained in:
Anne-Cath
2025-10-17 17:14:10 +02:00
parent 6226ac8746
commit b80aa236f2
4 changed files with 43 additions and 6 deletions

View File

@@ -40,12 +40,16 @@ class CoreCannotSaveObjectException extends CoreException
/**
* @return string
* @since 3.2.3 add param $bWithHeader
*/
public function getHtmlMessage()
public function getHtmlMessage($bWithHeader = false)
{
$sTitle = Dict::S('UI:Error:SaveFailed');
$sContent = "<span><strong>".utils::HtmlEntities($sTitle)."</strong></span>";
if ($bWithHeader) {
$oObject = MetaModel::GetObject($this->sObjectClass, $this->iObjectId, true, true);
$sContent .= "&nbsp;<span>".$oObject->Get('friendlyname')."</span>";
}
if (count($this->aIssues) == 1) {
$sIssue = reset($this->aIssues);
$sContent .= "&nbsp;<span>".utils::HtmlEntities($sIssue)."</span>";