public function __construct($domainId, $contactId) {
$this->domainId = $domainId;
$this->contactId = $contactId;
+ $this->values = array();
$this->filteredValues = array();
$this->combined = NULL;
}
if (!isset($this->bagsByDomain[$domainId])) {
$this->bagsByDomain[$domainId] = new SettingsBag($domainId, NULL);
- $this->bagsByDomain[$domainId]->loadValues()
+ if (\CRM_Core_Config::singleton()->dsn) {
+ $this->bagsByDomain[$domainId]->loadValues();
+ }
+ $this->bagsByDomain[$domainId]
->loadMandatory($this->getMandatory('domain'))
->loadDefaults($this->getDefaults('domain'));
}
$key = "$domainId:$contactId";
if (!isset($this->bagsByContact[$key])) {
$this->bagsByContact[$key] = new SettingsBag($domainId, $contactId);
- $this->bagsByContact[$key]->loadValues()
+ if (\CRM_Core_Config::singleton()->dsn) {
+ $this->bagsByContact[$key]->loadValues();
+ }
+ $this->bagsByContact[$key]
->loadDefaults($this->getDefaults('contact'))
->loadMandatory($this->getMandatory('contact'));
}