Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
680b0d40
Unverified
Commit
680b0d40
authored
Jun 06, 2020
by
IKEDA Soji
Committed by
GitHub
Jun 06, 2020
Browse files
Merge pull request #954 from ikedas/issue-953 by ikedas
"false" values in XML file prevent list creation (#953)
parents
ebe78372
60005144
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Config_XML.pm
View file @
680b0d40
...
...
@@ -168,7 +168,7 @@ sub _getChildren {
if
(
$type
==
1
)
{
# ELEMENT_NODE
my
$values
=
_getChildren
(
$child
);
return
undef
unless
$values
;
return
undef
unless
defined
$values
;
if
(
$child
->
getAttribute
('
multiple
'))
{
push
@
{
$multiple_nodes
->
{
$childName
}},
$values
;
...
...
t/Config_XML.t
View file @
680b0d40
...
...
@@ -59,6 +59,16 @@ is_deeply(
is
(
Sympa::
Config_XML
->
new
(
IO::
Scalar
->
new
(
\
(
shift
@in
)))
->
as_hashref
,
undef
);
is
(
Sympa::
Config_XML
->
new
(
IO::
Scalar
->
new
(
\
(
shift
@in
)))
->
as_hashref
,
undef
);
# GH#953: "false" values in XML file prevent list creation
if
(
isnt
(
my
$h
=
Sympa::
Config_XML
->
new
(
IO::
Scalar
->
new
(
\
(
shift
@in
)))
->
as_hashref
,
undef
)
)
{
is
(
$h
->
{
filtre
},
'
0
');
}
done_testing
();
__END__
...
...
@@ -126,3 +136,21 @@ __END__
</owner>
</list>
<?xml version="1.0" encoding="UTF-8"?>
<list>
<listname>liste.org1.test</listname>
<subject>Liste test</subject>
<custom_subject>TEST</custom_subject>
<topics>communication</topics>
<reply_mail>noreply@domaine.fr</reply_mail>
<status>open</status>
<source>mysql</source>
<send>diffuseur</send>
<filtre>0</filtre>
<owner multiple="1">
<email>listmaster@domaine.fr</email>
<gecos>listmaster</gecos>
<reception>mail</reception>
</owner>
</list>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment