From db69c486a0251bb6a7e1d8006988216d7ae1f4d3 Mon Sep 17 00:00:00 2001 From: Raissa North Date: Wed, 31 Jan 2018 17:25:32 +1300 Subject: [PATCH] FIX: Turn SilverStripe Map into an array to give an accurate falsey value --- src/Extensions/SiteTreeSubsites.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extensions/SiteTreeSubsites.php b/src/Extensions/SiteTreeSubsites.php index 5ac586a..d69383b 100644 --- a/src/Extensions/SiteTreeSubsites.php +++ b/src/Extensions/SiteTreeSubsites.php @@ -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)