mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR: Don't throw an error if no subsites are defined. (from r88951)
This commit is contained in:
parent
5779701814
commit
0ab9ffef9e
@ -11,6 +11,7 @@ class SubsitesVirtualPage extends VirtualPage {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$subsites = DataObject::get('Subsite');
|
||||
if(!$subsites) $subsites = new DataObjectSet();
|
||||
$subsites->push(new ArrayData(array('Title' => 'Main site', 'ID' => 0)));
|
||||
|
||||
$subsiteSelectionField = new DropdownField(
|
||||
|
Loading…
Reference in New Issue
Block a user