metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 160 forks source link

Issue in generatePhoneNumber function #10

Closed xikyu46 closed 9 years ago

xikyu46 commented 9 years ago

Hi,

First of all i am very happy you build this apps. This apps is very flexible and understandable rather than EPP RTK that based on java (actually this is also because my background is in PHP)

I need to submit one issue especially about function "generatePhoneNumber" when i input one digit country phone number (ex : +1.12334567) it will become incorrect. this function will make it become : +11.2334567.

so i add few line in at the first line of this function :

if(preg_match('/([0-9]{1,2}.[0-9]+)/',$number,$match)){ if(isset($match[1])){ return '+'.$match[1]; } }

i dont know if this solution is effective enough, but at lest maybe you can update your code to solve this problem.

metaregistrar commented 9 years ago

Hi

The phone number issue has been fixed. I have changed 'generatePhoneNumber' to 'validatePhone Number' which validates the number to the EPP RFC standard.