MINOR: Don't throw an error if no subsites are defined. (from r88951)

This commit is contained in:
Tom Rix 2010-03-01 21:26:53 +00:00
parent 5779701814
commit 0ab9ffef9e

View File

@ -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(