From 3215ab7597fcfd0cccae04a6501bcb19f30fc542 Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 28 Mar 2017 13:53:34 +1100 Subject: [PATCH] FIX, adding some further validation. --- code/services/MisdirectionService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/services/MisdirectionService.php b/code/services/MisdirectionService.php index 3e977b5..305c721 100644 --- a/code/services/MisdirectionService.php +++ b/code/services/MisdirectionService.php @@ -259,8 +259,7 @@ public function determineFallback($URL) { // This is required to support multiple sites. - if(ClassInfo::exists('Multisites')) { - $parent = Multisites::inst()->getCurrentSite(); + if(ClassInfo::exists('Multisites') && ($parent = Multisites::inst()->getCurrentSite())) { $parentID = $parent->ID; if($parent->Fallback) { $applicableRule = $parent->Fallback;