close #2561 Fixed: Countries prefix flaw

This commit is contained in:
Cüneyt Şentürk
2022-08-10 11:16:30 +03:00
parent ddfdfdcb8e
commit 0fd7b4e0c9
8 changed files with 35 additions and 9 deletions

View File

@@ -254,7 +254,7 @@ class Contact extends Model
$location[] = $this->state;
}
if ($this->country) {
if ($this->country && in_array($this->country, trans('countries'))) {
$location[] = trans('countries.' . $this->country);
}