Skip to content

Commit 5c18069

Browse files
committed
Fix an error with Phone number fields and countryName
1 parent 024a13a commit 5c18069

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/models/Phone.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@ public static function toPhoneString(mixed $value): string
4444

4545
public function __construct($config = [])
4646
{
47-
// Normalize the options
47+
// Normalize the settings. Included in `toArray` for integrations, but not actively in use. Potentially refactor.
4848
if (array_key_exists('countryCode', $config)) {
4949
unset($config['countryCode']);
5050
}
5151

52+
if (array_key_exists('countryName', $config)) {
53+
unset($config['countryName']);
54+
}
55+
5256
parent::__construct($config);
5357
}
5458

0 commit comments

Comments
 (0)