aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggPlugin.php')
-rw-r--r--engine/classes/ElggPlugin.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/engine/classes/ElggPlugin.php b/engine/classes/ElggPlugin.php
index ec28c8064..1e737f28e 100644
--- a/engine/classes/ElggPlugin.php
+++ b/engine/classes/ElggPlugin.php
@@ -499,12 +499,13 @@ class ElggPlugin extends ElggObject {
if ($site_guid) {
$site = get_entity($site_guid);
-
- if (!($site instanceof ElggSite)) {
- return false;
- }
} else {
- $site = get_config('site');
+ $site_guid = get_config('site');
+ $site = get_entity($site_guid);
+ }
+
+ if (!($site instanceof ElggSite)) {
+ return false;
}
return check_entity_relationship($this->guid, 'active_plugin', $site->guid);