mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX fixed a situation which would trigger a crash (from r88573)
This commit is contained in:
parent
f12eee0679
commit
ba1db5ae24
@ -52,7 +52,7 @@ class FileSubsites extends DataObjectDecorator {
|
||||
else $q='`';
|
||||
|
||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)
|
||||
if(!preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $query->where[0])) {
|
||||
if(!$query->where || !preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $query->where[0])) {
|
||||
if($context = DataObject::context_obj()) $subsiteID = (int) $context->SubsiteID;
|
||||
else $subsiteID = (int) Subsite::currentSubsiteID();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user