* @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;
}