Do not check for the extension we are trying to download itself
authorSeamus Lee <seamuslee001@gmail.com>
Mon, 14 Oct 2019 20:51:08 +0000 (07:51 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 14 Oct 2019 20:51:08 +0000 (07:51 +1100)
CRM/Extension/Downloader.php

index 285c2bfaab3680f06abc9f043cf584ef7c6a509c..2e5a19060ac4d8f51cbf71be5f1c1c81c846117c 100644 (file)
@@ -93,7 +93,7 @@ class CRM_Extension_Downloader {
     if ($extensionInfo) {
       $requiredExtensions = CRM_Extension_System::singleton()->getManager()->findInstallRequirements([$extensionInfo->key], $extensionInfo);
       foreach ($requiredExtensions as $extension) {
-        if (CRM_Extension_System::singleton()->getManager()->getStatus($extension) !== CRM_Extension_Manager::STATUS_INSTALLED) {
+        if (CRM_Extension_System::singleton()->getManager()->getStatus($extension) !== CRM_Extension_Manager::STATUS_INSTALLED && $extension !== $extensionInfo->key) {
           $errors[] = [
             'title' => ts('Missing Requirement: %1', [1 => $extension]),
             'message' => ts('You will not be able to install/upgrade %1 until you have installed the %2 extension.', [1 => $extensionInfo->key, 2 => $extension]),