Skip to content
Snippets Groups Projects
Commit b8fe9aaa authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

fix some undefined string warnings

parent c3f7bb8d
No related branches found
No related tags found
No related merge requests found
......@@ -130,14 +130,15 @@ sub parse {
$data->{registration_info}
{registration_instant} =
$registrationinfo->getAttribute('registrationInstant');
foreach my $registrationpolicy (
foreach my $policy (
$registrationinfo->getElementsByLocalName(
'RegistrationPolicy')
)
{
if ($registrationpolicy->getAttribute('lang') eq 'en') {
my $lang = $policy->getAttribute('lang');
if ($lang && $lang eq 'en') {
$data->{registration_info}->{registration_policy} =
$registrationpolicy->textContent();
$policy->textContent();
}
}
}
......@@ -146,7 +147,8 @@ sub parse {
$contact_details{type} = $child->getAttribute('contactType');
if (defined $contact_details{type}) {
foreach my $contact_child ($child->childNodes()) {
$contact_details{ $contact_child->localName } =
next unless $contact_child->nodeType() == XML_ELEMENT_NODE;
$contact_details{ $contact_child->localname() } =
$contact_child->textContent();
}
push @{ $data->{contacts} }, \%contact_details;
......@@ -231,8 +233,9 @@ sub print {
sub _boolean2integer {
return
$_[0] eq 'true' ? 1 :
$_[0] eq 'false' ? 0 :
! defined $_[0] ? undef :
$_[0] eq 'true' ? 1 :
$_[0] eq 'false' ? 0 :
undef;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment