diff --git a/CRM/Extension/Manager.php b/CRM/Extension/Manager.php
index 5b32af8dd0b6c1f6f674f0265ae541b3054d7858..14c7128dd6f2946e35dd6b556ac91602a9327a70 100644
--- a/CRM/Extension/Manager.php
+++ b/CRM/Extension/Manager.php
@@ -382,36 +382,41 @@ class CRM_Extension_Manager {
     $this->addProcess($keys, 'disable');
 
     foreach ($keys as $key) {
-      switch ($origStatuses[$key]) {
-        case self::STATUS_INSTALLED:
-          $this->addProcess([$key], 'disabling');
-          // throws Exception
-          list ($info, $typeManager) = $this->_getInfoTypeHandler($key);
-          $typeManager->onPreDisable($info);
-          $this->_setExtensionActive($info, 0);
-          $typeManager->onPostDisable($info);
-          $this->popProcess([$key]);
-          break;
-
-        case self::STATUS_INSTALLED_MISSING:
-          // throws Exception
-          list ($info, $typeManager) = $this->_getMissingInfoTypeHandler($key);
-          $typeManager->onPreDisable($info);
-          $this->_setExtensionActive($info, 0);
-          $typeManager->onPostDisable($info);
-          break;
-
-        case self::STATUS_DISABLED:
-        case self::STATUS_DISABLED_MISSING:
-        case self::STATUS_UNINSTALLED:
-          // ok, nothing to do
-          // Remove the 'disable' process as we're not doing that.
-          $this->popProcess([$key]);
-          break;
-
-        case self::STATUS_UNKNOWN:
-        default:
-          throw new CRM_Extension_Exception("Cannot disable unknown extension: $key");
+      if (isset($origStatuses[$key])) {
+        switch ($origStatuses[$key]) {
+          case self::STATUS_INSTALLED:
+            $this->addProcess([$key], 'disabling');
+            // throws Exception
+            list ($info, $typeManager) = $this->_getInfoTypeHandler($key);
+            $typeManager->onPreDisable($info);
+            $this->_setExtensionActive($info, 0);
+            $typeManager->onPostDisable($info);
+            $this->popProcess([$key]);
+            break;
+
+          case self::STATUS_INSTALLED_MISSING:
+            // throws Exception
+            list ($info, $typeManager) = $this->_getMissingInfoTypeHandler($key);
+            $typeManager->onPreDisable($info);
+            $this->_setExtensionActive($info, 0);
+            $typeManager->onPostDisable($info);
+            break;
+
+          case self::STATUS_DISABLED:
+          case self::STATUS_DISABLED_MISSING:
+          case self::STATUS_UNINSTALLED:
+            // ok, nothing to do
+            // Remove the 'disable' process as we're not doing that.
+            $this->popProcess([$key]);
+            break;
+
+          case self::STATUS_UNKNOWN:
+          default:
+            throw new CRM_Extension_Exception("Cannot disable unknown extension: $key");
+        }
+      }
+      else {
+        throw new CRM_Extension_Exception("Cannot disable unknown extension: $key");
       }
     }
 
diff --git a/CRM/Upgrade/Incremental/Base.php b/CRM/Upgrade/Incremental/Base.php
index 60d4ca3a67e7444e4887f70da134bf005b2bee10..b51992a9a4d42bc5f0f81402e7eb0f2c305ae6c4 100644
--- a/CRM/Upgrade/Incremental/Base.php
+++ b/CRM/Upgrade/Incremental/Base.php
@@ -268,7 +268,7 @@ class CRM_Upgrade_Incremental_Base {
    *
    * @return bool
    */
-  public function updateSmartGroups($ctx, $actions) {
+  public static function updateSmartGroups($ctx, $actions) {
     $groupUpdateObject = new CRM_Upgrade_Incremental_SmartGroups();
     $groupUpdateObject->updateGroups($actions);
     return TRUE;
diff --git a/CRM/Upgrade/Incremental/php/FiveSeventeen.php b/CRM/Upgrade/Incremental/php/FiveSeventeen.php
index 5f86560b0c49b00233fe4cb9c0fded1e05182ac2..4560afa58f7ee52ea673e5d6a81b3b0b5742cd58 100644
--- a/CRM/Upgrade/Incremental/php/FiveSeventeen.php
+++ b/CRM/Upgrade/Incremental/php/FiveSeventeen.php
@@ -104,7 +104,7 @@ class CRM_Upgrade_Incremental_php_FiveSeventeen extends CRM_Upgrade_Incremental_
   /**
    * Update safe file types.
    */
-  public function updateFileTypes() {
+  public static function updateFileTypes() {
     CRM_Core_BAO_OptionValue::ensureOptionValueExists([
       'option_group_id' => 'safe_file_extension',
       'label' => 'pptx',
diff --git a/CRM/Upgrade/Incremental/php/FiveTwentySeven.php b/CRM/Upgrade/Incremental/php/FiveTwentySeven.php
index e84a025d24de6385dbe6f06272593e9b76d94781..f7f307c6c0f26cab1395962a9ba341d041d516d1 100644
--- a/CRM/Upgrade/Incremental/php/FiveTwentySeven.php
+++ b/CRM/Upgrade/Incremental/php/FiveTwentySeven.php
@@ -71,7 +71,7 @@ class CRM_Upgrade_Incremental_php_FiveTwentySeven extends CRM_Upgrade_Incrementa
     $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
   }
 
-  public function priceFieldValueLabelRequired($ctx) {
+  public static function priceFieldValueLabelRequired($ctx) {
     $locales = CRM_Core_I18n::getMultilingual();
     if ($locales) {
       foreach ($locales as $locale) {
@@ -86,7 +86,7 @@ class CRM_Upgrade_Incremental_php_FiveTwentySeven extends CRM_Upgrade_Incrementa
     return TRUE;
   }
 
-  public function nameMembershipTypeRequired($ctx) {
+  public static function nameMembershipTypeRequired($ctx) {
     $locales = CRM_Core_I18n::getMultilingual();
     if ($locales) {
       foreach ($locales as $locale) {
diff --git a/CRM/Upgrade/Incremental/php/FiveTwentySix.php b/CRM/Upgrade/Incremental/php/FiveTwentySix.php
index b23c29d6e6d9e983068a72d72f68ad54fb2e820c..cc04839d951526353eb2671b65d412ed8b7f920d 100644
--- a/CRM/Upgrade/Incremental/php/FiveTwentySix.php
+++ b/CRM/Upgrade/Incremental/php/FiveTwentySix.php
@@ -81,7 +81,7 @@ class CRM_Upgrade_Incremental_php_FiveTwentySix extends CRM_Upgrade_Incremental_
   /**
    * Update workflow_name based on workflow_id values.
    */
-  public function populateWorkflowName() {
+  public static function populateWorkflowName() {
     CRM_Core_DAO::executeQuery('UPDATE civicrm_msg_template
       LEFT JOIN  civicrm_option_value ov ON ov.id = workflow_id
       SET workflow_name = ov.name'