diff --git a/src/main/php/eu/europa/cedefop/europass/xml2form.php b/src/main/php/eu/europa/cedefop/europass/xml2form.php index 3c2eb0c..22548ee 100644 --- a/src/main/php/eu/europa/cedefop/europass/xml2form.php +++ b/src/main/php/eu/europa/cedefop/europass/xml2form.php @@ -88,7 +88,11 @@ } if ($identification->getElementsByTagName("TelephoneList")) { $telephones = $identification->getElementsByTagName("TelephoneList"); - if ($telephones->length < 1) {$telephone=NULL; $telephone2=NULL; $telephone3=NULL;} + + $telephone=NULL; + $telephone2=NULL; + $telephone3=NULL; + foreach ($telephones as $telephone) { $index = 0; foreach ($identification->getElementsByTagName("Telephone") as $telephoneNode) { @@ -98,11 +102,9 @@ if ($index == 1 && $telephoneNode->getElementsByTagName("Contact")) { $telephone2 = $telephoneNode->getElementsByTagName("Contact")->item(0)->nodeValue; } - else {$telephone2 = NULL;} if ($index == 2 && $telephoneNode->getElementsByTagName("Contact")) { $telephone3 = $telephoneNode->getElementsByTagName("Contact")->item(0)->nodeValue; } - else {$telephone3 = NULL;} $index ++; } } @@ -576,4 +578,4 @@ echo '
'; echo '
Go Back
'; echo ''; -?> \ No newline at end of file +?>