mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°8395 - php8.1 compatibility in class extended Exception
This commit is contained in:
@@ -631,7 +631,7 @@ abstract class AbstractBrick implements TemplatesProviderInterface
|
||||
// Checking mandatory elements
|
||||
if (!$oMDElement->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('Brick node must have both id and xsi:type attributes defined', null, null, $oMDElement);
|
||||
throw new DOMFormatException('Brick node must have both id and xsi:type attributes defined', 0, null, $oMDElement);
|
||||
}
|
||||
$this->SetId($oMDElement->getAttribute('id'));
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class AggregatePageBrick extends PortalBrick
|
||||
{
|
||||
if (!$oAggregatePageBrickNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('AggregatePageBrick : must have an id attribute', null,
|
||||
throw new DOMFormatException('AggregatePageBrick : must have an id attribute', 0,
|
||||
null, $oAggregatePageBrickNode);
|
||||
}
|
||||
$sBrickName = $oAggregatePageBrickNode->getAttribute('id');
|
||||
|
||||
@@ -375,7 +375,7 @@ class BrowseBrick extends PortalBrick
|
||||
{
|
||||
if (!$oModeNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('BrowseBrick: Browse mode must have a unique ID attribute', null,
|
||||
throw new DOMFormatException('BrowseBrick: Browse mode must have a unique ID attribute', 0,
|
||||
null, $oModeNode);
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ class BrowseBrick extends PortalBrick
|
||||
// Checking that the brick has at least a browse mode
|
||||
if (count($this->GetAvailablesBrowseModes()) === 0)
|
||||
{
|
||||
throw new DOMFormatException('BrowseBrick : Must have at least one browse mode', null, null, $oMDElement);
|
||||
throw new DOMFormatException('BrowseBrick : Must have at least one browse mode', 0, null, $oMDElement);
|
||||
}
|
||||
// Checking that default browse mode in among the available
|
||||
if (!in_array($this->sDefaultBrowseMode, array_keys($this->aAvailablesBrowseModes)))
|
||||
@@ -427,7 +427,7 @@ class BrowseBrick extends PortalBrick
|
||||
// Checking that the brick has at least a level
|
||||
if (count($this->GetLevels()) === 0)
|
||||
{
|
||||
throw new DOMFormatException('BrowseBrick : Must have at least one level', null, null, $oMDElement);
|
||||
throw new DOMFormatException('BrowseBrick : Must have at least one level', 0, null, $oMDElement);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
@@ -252,7 +252,7 @@ class FilterBrick extends PortalBrick
|
||||
// Checking that the brick has at least a target brick id
|
||||
if (($this->GetTargetBrickId() === null) || ($this->GetTargetBrickId() === ''))
|
||||
{
|
||||
throw new DOMFormatException('FilterBrick : Must have a target brick id', null, null, $oMDElement);
|
||||
throw new DOMFormatException('FilterBrick : Must have a target brick id', 0, null, $oMDElement);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
||||
@@ -893,7 +893,7 @@ class ManageBrick extends PortalBrick
|
||||
if (!$oModeNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick: Display mode must have a unique ID attribute',
|
||||
null, null, $oModeNode);
|
||||
0, null, $oModeNode);
|
||||
}
|
||||
|
||||
$sModeId = $oModeNode->getAttribute('id');
|
||||
@@ -930,7 +930,7 @@ class ManageBrick extends PortalBrick
|
||||
{
|
||||
if (!$oFieldNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute', null,
|
||||
throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute', 0,
|
||||
null, $oFieldNode);
|
||||
}
|
||||
$this->AddField($oFieldNode->getAttribute('id'));
|
||||
@@ -950,7 +950,7 @@ class ManageBrick extends PortalBrick
|
||||
if (!$oFieldNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute',
|
||||
null,
|
||||
0,
|
||||
null, $oFieldNode);
|
||||
}
|
||||
$this->AddExportField($oFieldNode->getAttribute('id'));
|
||||
@@ -1012,7 +1012,7 @@ class ManageBrick extends PortalBrick
|
||||
if (!$oGroupNode->hasAttribute('id'))
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Group must have a unique ID attribute',
|
||||
null, null, $oGroupNode);
|
||||
0, null, $oGroupNode);
|
||||
}
|
||||
$sGroupId = $oGroupNode->getAttribute('id');
|
||||
|
||||
@@ -1038,12 +1038,12 @@ class ManageBrick extends PortalBrick
|
||||
if (!isset($aGroup['title']) || $aGroup['title'] === '')
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Group must have a title tag and it must not be empty',
|
||||
null, null, $oGroupNode);
|
||||
0, null, $oGroupNode);
|
||||
}
|
||||
if (!isset($aGroup['condition']) || $aGroup['condition'] === '')
|
||||
{
|
||||
throw new DOMFormatException('ManageBrick : Group must have a condition tag and it must not be empty',
|
||||
null, null, $oGroupNode);
|
||||
0, null, $oGroupNode);
|
||||
}
|
||||
$aGroups[] = $aGroup;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ class UserProfileBrick extends PortalBrick
|
||||
|
||||
$this->aForm['fields'][$sFieldId] = $aField;
|
||||
} else {
|
||||
throw new DOMFormatException('Field tag must have an id attribute', null, null, $oFieldNode);
|
||||
throw new DOMFormatException('Field tag must have an id attribute', 0, null, $oFieldNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,13 +53,13 @@ class Forms extends AbstractConfiguration
|
||||
$sFormId = $oFormNode->getAttribute('id');
|
||||
if ($oFormNode->getAttribute('id') === '')
|
||||
{
|
||||
throw new DOMFormatException('form tag must have an id attribute', null, null, $oFormNode);
|
||||
throw new DOMFormatException('form tag must have an id attribute', 0, null, $oFormNode);
|
||||
}
|
||||
|
||||
// Parsing form object class
|
||||
if ($oFormNode->GetUniqueElement('class')->GetText() === null)
|
||||
{
|
||||
throw new DOMFormatException('Class tag must be defined', null, null, $oFormNode);
|
||||
throw new DOMFormatException('Class tag must be defined', 0, null, $oFormNode);
|
||||
}
|
||||
|
||||
// Parsing class
|
||||
@@ -149,7 +149,7 @@ class Forms extends AbstractConfiguration
|
||||
$sModeId = $oModeNode->getAttribute('id');
|
||||
if ($sModeId === '')
|
||||
{
|
||||
throw new DOMFormatException('mode tag must have an id attribute', null, null,
|
||||
throw new DOMFormatException('mode tag must have an id attribute', 0, null,
|
||||
$oFormNode);
|
||||
}
|
||||
$aModes[] = $sModeId;
|
||||
@@ -225,7 +225,7 @@ class Forms extends AbstractConfiguration
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new DOMFormatException('Field tag must have an id attribute', null, null,
|
||||
throw new DOMFormatException('Field tag must have an id attribute', 0, null,
|
||||
$oFormNode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class Lists extends AbstractConfiguration
|
||||
$sClassId = $oClassNode->getAttribute('id');
|
||||
if ($sClassId === null)
|
||||
{
|
||||
throw new DOMFormatException('Class tag must have an id attribute', null, null, $oClassNode);
|
||||
throw new DOMFormatException('Class tag must have an id attribute', 0, null, $oClassNode);
|
||||
}
|
||||
|
||||
// - Each lists
|
||||
|
||||
@@ -490,7 +490,7 @@ EOF;
|
||||
{
|
||||
throw new DOMFormatException(
|
||||
'Scope tag in class must have a not empty oql_view tag',
|
||||
null,
|
||||
0,
|
||||
null,
|
||||
$oScopeNode
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user