Fix error when dataQuery is a null object

This commit is contained in:
madmatt 2016-07-18 17:10:11 +12:00
parent 871e2bcefd
commit 3962df53cd

View File

@ -33,7 +33,7 @@ class SiteTreeSubsites extends DataExtension
if (Subsite::$disable_subsite_filter) {
return;
}
if ($dataQuery->getQueryParam('Subsite.filter') === false) {
if ($dataQuery && $dataQuery->getQueryParam('Subsite.filter') === false) {
return;
}