When you use the UK/British phone code, when drupal formats the phone number, it returns the array twice.
This means your HTML will start with array(+44 00...) etc.

To fix this bug, edit the last lines of phone_uk_inc to read....

return $phonenumber;
}

}

The closing if / else brace was in the wrong place.

Comments

thierry_gd’s picture

Version:5.x-1.x-dev» 5.x-2.7
Assigned:Unassigned» thierry_gd
Status:Active» Fixed

Taken into account in 5.2.7 version

Anonymous’s picture

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Ulti’s picture

Version:5.x-2.7» 5.x-2.9

Hi, This isn't an issue at all, the first if just returns the function OR the else is evaluated. It makes no difference if the else is even there or not, as the code has either returned the function or gone on to evaluate the rest of the function block.

However, there is still an issue with a var_export still being present in the most recently downloaded version of this module (5.x-2.9). Which I reported previously and submitted a patch back in December 2007!!! http://drupal.org/node/194731#comment-654960 Could you please make the changes to the current release, at present anyone using a UK phone number is going to be scratching their head wondering what all the weird debug output is about.

Line #125 phone.uk.inc

   preg_match($regex, $phonenumber, $matches);
   var_export($matches);    //This is a critical bug, it screws up the rendering of a page after submitting a node that uses a UK phone number
   $area = $matches[2].$matches[5].$matches[8];
Ulti’s picture

Priority:Normal» Critical
Status:Closed (fixed)» Active
thierry_gd’s picture

Status:Active» Fixed

Fixed in 5.2.11 version

Anonymous’s picture

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.