mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
Merge pull request #452 from chrometoasters/bugfix/default-subsite-query
FIX Adjusting query used in getSubsiteIDForDomain()
This commit is contained in:
commit
5a4d613d8e
@ -312,7 +312,7 @@ class Subsite extends DataObject
|
||||
|
||||
$subsiteID = $subsiteIDs[0];
|
||||
} else {
|
||||
if ($default = DataObject::get_one(Subsite::class, '"DefaultSite" = 1')) {
|
||||
if ($default = Subsite::get()->filter('DefaultSite', 1)->setQueriedColumns(['ID'])->first()) {
|
||||
// Check for a 'default' subsite
|
||||
$subsiteID = $default->ID;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user