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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

msmithcti’s picture

Status: Active » Needs review
FileSize
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