Hello,

I found a bug in phone.es.inc file:

Validation function (valid_es_phone_number) works OK (I didn't try every possible combination, but for me there was no bugs until now...), but format function (format_es_phone_number) converts any inserted phone number into an string with two characters (two blank spaces) before inserting into database because of the preg_match function in line 68.

In order to fix it temporarily , just comment the line 71 and it won't delete the number, but no format is applied (inserted value == shown value):

<?php
// $phonenumber = $matches[1] . ' ' . $matches[2] . ' ' . $matches[3];
?>

I also attached a patch for this temporary solution

Files: 
CommentFileSizeAuthor
phone.es_.inc_.patch427 bytesgrisendo

Comments

Version:6.x-2.18» 6.x-2.9

it seems to be still true in the last stable release...

Version:6.x-2.9» 6.x-2.18

[changed version by mistake - fixed it]

how about porting the patch to the 7 version? Please, it's kinda urgent.

After applying this patch is needed this other: #1309680: Spanish format doesn't work properly

Is this patch going to be committed?

Guys why did you release a new version without fixing this?