Merge "Link to existing login help page by default from helplogin-url"
[lhc/web/wiklou.git] / includes / api / ApiFormatXml.php
index e707eb4..764e609 100644 (file)
@@ -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] );
+                                       }
                                }
                        }