From 91e1627497d53cba04c6919575efb7061daf125a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 7 Jun 2022 17:03:04 -0700 Subject: [PATCH] (dev/core#3496) Missing extension leads to bootstrap error for "hook_civicrm_entityTypes" --- CRM/Extension/Manager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Extension/Manager.php b/CRM/Extension/Manager.php index 444f86ec32b4..800a7b3ce71b 100644 --- a/CRM/Extension/Manager.php +++ b/CRM/Extension/Manager.php @@ -712,9 +712,12 @@ private function _setExtensionActive(CRM_Extension_Info $info, $isActive) { * @return CRM_Extension_Info|NULL */ public function createInfoFromDB($key) { - $dao = new CRM_Core_DAO_Extension(); - $dao->full_name = $key; - if ($dao->find(TRUE)) { + // System hasn't booted - and extension is missing. Need low-tech/no-hook SELECT to learn more about what's missing. + $select = CRM_Utils_SQL_Select::from('civicrm_extension') + ->where('full_name = @key', ['key' => $key]) + ->select('full_name, type, name, label, file'); + $dao = $select->execute(); + if ($dao->fetch()) { $info = new CRM_Extension_Info($dao->full_name, $dao->type, $dao->name, $dao->label, $dao->file); return $info; }