Skip to content

Commit

Permalink
Fixed an issue with country code not given in backend view
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Jun 5, 2023
1 parent d560649 commit 9c8778a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EventListener/InsertTagsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private function replaceCompanyInsertTags(string $insertTag, string $field): str
return empty($value = $company->get('country')) ? '' : System::getContainer()->get('contao.intl.countries')->getCountries()[strtoupper($value)] ?? $value;

case 'countrycode':
return $company->get('country');
return $company->get('country') ?? '';

case 'vcard_url':
$pageId = (null !== ($request = $this->requestStack->getCurrentRequest())) ? $request->attributes->get('pageModel')->id : 0;
Expand Down

0 comments on commit 9c8778a

Please sign in to comment.