diff --git a/src/main/php/eu/europa/cedefop/europass/xml2db.php b/src/main/php/eu/europa/cedefop/europass/xml2db.php index 57bbe31..f0cb121 100644 --- a/src/main/php/eu/europa/cedefop/europass/xml2db.php +++ b/src/main/php/eu/europa/cedefop/europass/xml2db.php @@ -78,7 +78,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) { @@ -88,11 +92,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 ++; } } @@ -516,4 +518,4 @@ echo '
