aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggPluginPackage.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/engine/classes/ElggPluginPackage.php b/engine/classes/ElggPluginPackage.php
index e1b3427cc..567ec129f 100644
--- a/engine/classes/ElggPluginPackage.php
+++ b/engine/classes/ElggPluginPackage.php
@@ -438,7 +438,7 @@ class ElggPluginPackage {
* @return bool
*/
private function checkDepPriority(array $dep, array $plugins, $inverse = false) {
- // see if we exist as an ElggPlugin
+ // grab the ElggPlugin using this package.
$this_plugin = elgg_get_plugin_from_id($this->getID());
$this_priority = $this_plugin->getPriority();
@@ -448,6 +448,16 @@ class ElggPluginPackage {
}
}
+ // If this isn't a plugin or there are no active plugins,
+ // we can't satisfy this dep.
+ // Assume everything is ok. See #2946.
+ if (!$this->plugin || !$plugins) {
+ return array(
+ 'status' => true,
+ 'value' => 'uninstalled'
+ );
+ }
+
$test_plugin_priority = $test_plugin->getPriority();
switch ($dep['priority']) {