From 9ecf49f6d5756c8253ddaaebc1c40d09a6b75542 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 24 Feb 2024 14:20:50 +1100 Subject: [PATCH] Fixes for null coalescing --- app/DataMapper/Tax/BaseRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/DataMapper/Tax/BaseRule.php b/app/DataMapper/Tax/BaseRule.php index ccc0d46a4449..d921f2006887 100644 --- a/app/DataMapper/Tax/BaseRule.php +++ b/app/DataMapper/Tax/BaseRule.php @@ -271,7 +271,7 @@ class BaseRule implements RuleInterface public function isTaxableRegion(): bool { return $this->client->company->tax_data->regions->{$this->client_region}->tax_all_subregions || - (property_exists($this->client->company->tax_data->regions->{$this->client_region}->subregions, $this->client_subregion) && $this->client->company->tax_data->regions->{$this->client_region}->subregions->{$this->client_subregion}->apply_tax); + (property_exists($this->client->company->tax_data->regions->{$this->client_region}->subregions, $this->client_subregion) && ($this->client->company->tax_data->regions->{$this->client_region}->subregions->{$this->client_subregion}->apply_tax ?? false)); } public function defaultForeign(): self