X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFormatXml.php;h=764e6090059c73810d9edb03c1a336fde1eeadba;hb=d16f223edf4dcb24b77160ce0be86ef9f9c940fd;hp=e707eb4e28d71838b56c8c68e59051ab5884bae8;hpb=edbc9edd09ac2f34a97a81aa917a51a0c45649a8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index e707eb4e28..764e609005 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -156,6 +156,13 @@ class ApiFormatXml extends ApiFormatBase { } elseif ( is_array( $subElemValue ) ) { $subElements[$subElemId] = $subElemValue; unset( $elemValue[$subElemId] ); + } elseif ( is_bool( $subElemValue ) ) { + // treat true as empty string, skip false in xml format + if ( $subElemValue === true ) { + $subElemValue = ''; + } else { + unset( $elemValue[$subElemId] ); + } } }