The $codes array in phone_country_code_convert() is declared static, it is then flipped depending on the flag $Input_type. This causes the flag to work completely opposite second time it's called.

Tiny patch to follow.

#1 phone-country-code-convert-1988762-2.patch823 bytessplatio
Members fund testing for the Drupal project. Drupal Association Learn more


splatio’s picture

Status: Active » Needs review
823 bytes
roderik’s picture

Issue summary: View changes

+1 to this, but it's also fixed in #2108707: Improved parsing of international numbers. (That's why I haven't tested this patch separately.)

DamienMcKenna’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2108707: Improved parsing of international numbers