--- phone.cs.inc.orig	2009-11-05 12:07:56.000000000 +0100
+++ phone.cs.inc	2009-11-16 20:09:06.000000000 +0100
@@ -37,7 +37,7 @@ function valid_cs_phone_number($phonenum
  * @param $phonenumber must be a valid nine-digit number (with optional international prefix)
  * 
  */
-function format_cs_phone_number($phonenumber) {
+function format_cs_phone_number($phonenumber, $field) {
 
   // define regular expression   
   $regex = "/^((?:\+|00)420)? ?(\d{3}) ?(\d{3}) ?(\d{3})$/";  
@@ -46,8 +46,8 @@ function format_cs_phone_number($phonenu
   preg_match($regex, $phonenumber, $matches);
   
   if ($field['phone_country_code']) {
-    	$phonenumber = "+420" . " " . $matches[2] .' '. $matches[] .' '. $matches[4]; 
-   }   
+    	$phonenumber = '+420 ' . $matches[2] .' '. $matches[3] .' '. $matches[4]; 
+  }   
   else { 
   	$phonenumber = $matches[2] .' '. $matches[3] .' '. $matches[4];
   }
