From 8ad30bee5cf748f4d7807891a3ab2c862375d9ff Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 5 Oct 2019 11:11:54 +0200 Subject: [PATCH] Do not fatal on missing extensions Currently a missing extension will lead to a complete fatal on afforms. We can ignore these in the extensions, missing extensions are otherwise notified in corre --- ext/afform/core/CRM/Afform/AfformScanner.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/afform/core/CRM/Afform/AfformScanner.php b/ext/afform/core/CRM/Afform/AfformScanner.php index 2c5f86c1f3..589602369d 100644 --- a/ext/afform/core/CRM/Afform/AfformScanner.php +++ b/ext/afform/core/CRM/Afform/AfformScanner.php @@ -55,8 +55,13 @@ class CRM_Afform_AfformScanner { $mapper = CRM_Extension_System::singleton()->getMapper(); foreach ($mapper->getModules() as $module) { /** @var $module CRM_Core_Module */ - if ($module->is_active) { - $this->appendFilePaths($paths, dirname($mapper->keyToPath($module->name)) . DIRECTORY_SEPARATOR . 'ang', 20); + try { + if ($module->is_active) { + $this->appendFilePaths($paths, dirname($mapper->keyToPath($module->name)) . DIRECTORY_SEPARATOR . 'ang', 20); + } + } + catch (CRM_Extension_Exception_MissingException $e) { + // If the extension is missing skip & continue. } } -- 2.25.1