From 5c18069688e113dd4e214cd377de5997a9cb5aca Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Tue, 28 May 2024 23:49:04 +1000 Subject: [PATCH] Fix an error with Phone number fields and `countryName` --- src/models/Phone.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/models/Phone.php b/src/models/Phone.php index 247b95757..aae762a7e 100644 --- a/src/models/Phone.php +++ b/src/models/Phone.php @@ -44,11 +44,15 @@ public static function toPhoneString(mixed $value): string public function __construct($config = []) { - // Normalize the options + // Normalize the settings. Included in `toArray` for integrations, but not actively in use. Potentially refactor. if (array_key_exists('countryCode', $config)) { unset($config['countryCode']); } + if (array_key_exists('countryName', $config)) { + unset($config['countryName']); + } + parent::__construct($config); }