mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
N°2870 - Portal: Fix "Notice: Undefined index: UI:PropertiesTab" on object form
This commit is contained in:
@@ -244,10 +244,11 @@ class ApplicationHelper
|
||||
* Generate the form data for the $sClass.
|
||||
* Form will look like the "Properties" tab of a $sClass object in the console.
|
||||
*
|
||||
* @param string $sClass
|
||||
* @param bool $bAddLinksets
|
||||
* @param string $sClass
|
||||
* @param bool $bAddLinksets
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected static function GenerateDefaultFormForClass($sClass, $bAddLinksets = false)
|
||||
{
|
||||
@@ -275,6 +276,13 @@ class ApplicationHelper
|
||||
// - Retrieve zlist details
|
||||
$aDetailsList = MetaModel::GetZListItems($sClass, 'details');
|
||||
$aDetailsStruct = cmdbAbstractObject::ProcessZlist($aDetailsList, array(), 'UI:PropertiesTab', 'col1', '');
|
||||
if(!isset($aDetailsStruct['UI:PropertiesTab']))
|
||||
{
|
||||
// For the iTop administrator
|
||||
IssueLog::Error('Could not generate default form for "'.$sClass.'" class. Is the "details" zlist empty?');
|
||||
// For the end-user
|
||||
throw new Exception('Could not generate form, check the error log for more information.');
|
||||
}
|
||||
$aPropertiesStruct = $aDetailsStruct['UI:PropertiesTab'];
|
||||
|
||||
// Count cols (not linksets)
|
||||
|
||||
Reference in New Issue
Block a user