FIX: Turn SilverStripe Map into an array to give an accurate falsey value

This commit is contained in:
Raissa North 2018-01-31 17:25:32 +13:00
parent bb5f2c07e1
commit db69c486a0

View File

@ -105,7 +105,7 @@ class SiteTreeSubsites extends DataExtension
$subsitesMap = [];
if ($subsites && $subsites->count()) {
$subsitesToMap = $subsites->exclude('ID', $this->owner->SubsiteID);
$subsitesMap = $subsitesToMap->map('ID', 'Title');
$subsitesMap = $subsitesToMap->map('ID', 'Title')->toArray();
}
// Master page edit field (only allowed from default subsite to avoid inconsistent relationships)