Skip to content

Commit

Permalink
Null values has xsi:nil in xml request instead of being empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Dukecz committed Jan 12, 2016
1 parent 27abb10 commit 558f78c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6176,7 +6176,11 @@ function serializeType($name, $type, $value, $use='encoded', $encodingStyle=fals
if ($forceType) {
$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>";
} else {
$xml = "<$name$elementNS>$value</$name>";
if(is_null($value)) {
$xml = "<$name$elementNS xsi:nil=\"true\"/>";
} else {
$xml = "<$name$elementNS>$value</$name>";
}
}
} else {
$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>";
Expand Down

0 comments on commit 558f78c

Please sign in to comment.