mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUG Add some exist check for tabsets which may not be there (#2079)
This commit is contained in:
parent
1db01ecce6
commit
07e70148da
@ -37,10 +37,13 @@ class SiteTreeFileFormFactoryExtension extends DataExtension
|
||||
$usedOnField->setDescription($backlinkHTML);
|
||||
}
|
||||
|
||||
// Add field to new tab
|
||||
$tab = Tab::create('Usage', _t(__CLASS__.'.USAGE', 'Usage'), $usedOnField);
|
||||
/** @var TabSet $tabset */
|
||||
$tabset = $fields->fieldByName('Editor');
|
||||
$tabset->push($tab);
|
||||
if ($tabset) {
|
||||
// Add field to new tab
|
||||
/** @var Tab $tab */
|
||||
$tab = Tab::create('Usage', _t(__CLASS__.'.USAGE', 'Usage'), $usedOnField);
|
||||
$tabset->push($tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user