diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 8a26c42ac..7fda20437 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -989,8 +989,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid foreach(array('Stage', 'Live') as $stage) { // Start by filling the array with the pages that actually exist $table = ($stage=='Stage') ? "SiteTree" : "SiteTree_$stage"; - $result = DB::query("SELECT \"ID\",0 FROM \"$table\" - WHERE \"ID\" IN (".implode(", ", $ids).")")->map(); + $result = array_fill_keys(DB::query("SELECT \"ID\" FROM \"$table\" + WHERE \"ID\" IN (".implode(", ", $ids).")")->column(), false); // Get the uninherited permissions $uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"CanEditType\" = 'LoggedInUsers' OR