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.

Files: 
CommentFileSizeAuthor
#1 phone-country-code-convert-1988762-2.patch823 bytessplatio

Comments

splatio’s picture

Status:Active» Needs review
StatusFileSize
new823 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.)