From dde9383694ce92614f6f97d189c3c1599cfb1555 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 21 Apr 2021 12:28:22 -0700 Subject: [PATCH] Extensions - In case of dirty removal, skip classloader --- CRM/Extension/Manager/Module.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Extension/Manager/Module.php b/CRM/Extension/Manager/Module.php index f4ce5ceb78..4dc170aaf3 100644 --- a/CRM/Extension/Manager/Module.php +++ b/CRM/Extension/Manager/Module.php @@ -101,7 +101,16 @@ class CRM_Extension_Manager_Module extends CRM_Extension_Manager_Base { * @param CRM_Extension_Info $info */ private function registerClassloader($info) { - CRM_Extension_System::singleton()->getClassLoader()->installExtension($info, dirname($this->mapper->keyToPath($info->key))); + try { + $extPath = dirname($this->mapper->keyToPath($info->key)); + } + catch (CRM_Extension_Exception_MissingException $e) { + // This could happen if there was a dirty removal (i.e. deleting ext-code before uninstalling). + return; + } + + $classloader = CRM_Extension_System::singleton()->getClassLoader(); + $classloader->installExtension($info, $extPath); } } -- 2.25.1