diff options
Diffstat (limited to 'engine/classes/ElggPluginManifest.php')
-rw-r--r-- | engine/classes/ElggPluginManifest.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 9fcdaaf55..290a59a0c 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -330,7 +330,12 @@ class ElggPluginManifest { * @return array */ public function getProvides() { - $provides = $this->parser->getAttribute('provides'); + // normalize for 1.7 + if ($this->getApiVersion() < 1.8) { + $provides = array(); + } else { + $provides = $this->parser->getAttribute('provides'); + } if (!$provides) { $provides = array(); @@ -370,6 +375,8 @@ class ElggPluginManifest { 'comparison' => 'ge' ) ); + } else { + $reqs = array(); } } else { $reqs = $this->parser->getAttribute('requires'); @@ -465,7 +472,12 @@ class ElggPluginManifest { * @return array */ public function getConflicts() { - $conflicts = $this->parser->getAttribute('conflicts'); + // normalize for 1.7 + if ($this->getApiVersion() < 1.8) { + $conflicts = array(); + } else { + $conflicts = $this->parser->getAttribute('conflicts'); + } if (!$conflicts) { $conflicts = array(); |