[REF][PHP8.2] Declare siteDefaultCountry property
authorBradley Taylor <hello@brad-taylor.co.uk>
Mon, 29 May 2023 15:59:13 +0000 (16:59 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Mon, 29 May 2023 15:59:13 +0000 (16:59 +0100)
CRM/Import/Parser.php

index bfce7cdaef37c4f0a33b49a54311d6083fa9fcd4..8386bcae815bd1af34b98bcec8dfd7953125fc46 100644 (file)
@@ -90,6 +90,11 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    */
   protected $statesByCountry = [];
 
+  /**
+   * @var int|null
+   */
+  protected $siteDefaultCountry = NULL;
+
   /**
    * @return int|null
    */
@@ -1954,7 +1959,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
    * @return int
    */
   protected function getSiteDefaultCountry(): int {
-    if (!isset($this->siteDefaultCountry)) {
+    if ($this->siteDefaultCountry === NULL) {
       $this->siteDefaultCountry = (int) Civi::settings()->get('defaultContactCountry');
     }
     return $this->siteDefaultCountry;