Skip to content

Commit

Permalink
Merge pull request #26370 from braders/getSiteDefaultCountry-property
Browse files Browse the repository at this point in the history
[REF][PHP8.2] Declare getSiteDefaultCountry property
  • Loading branch information
demeritcowboy authored May 29, 2023
2 parents dff771a + f98140e commit 17dffa9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CRM/Import/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ abstract class CRM_Import_Parser implements UserJobInterface {
*/
protected $statesByCountry = [];

/**
* @var int|null
*/
protected $siteDefaultCountry = NULL;

/**
* @return int|null
*/
Expand Down Expand Up @@ -1954,7 +1959,7 @@ protected function getOddlyMappedMetadataFields(): array {
* @return int
*/
protected function getSiteDefaultCountry(): int {
if (!isset($this->siteDefaultCountry)) {
if ($this->siteDefaultCountry === NULL) {
$this->siteDefaultCountry = (int) Civi::settings()->get('defaultContactCountry');
}
return $this->siteDefaultCountry;
Expand Down

0 comments on commit 17dffa9

Please sign in to comment.