Skip to content

Commit

Permalink
Fix an error with Phone number fields and countryName
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed May 28, 2024
1 parent 024a13a commit 5c18069
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/models/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5c18069

Please sign in to comment.