Literal "0" was getting quoted. Because, of course, 0 is equal to the
empty string.
# marks omitted, but not all. (Although a literal " is not
# permitted, we don't check for that, since it will be escaped
# anyway.)
# marks omitted, but not all. (Although a literal " is not
# permitted, we don't check for that, since it will be escaped
# anyway.)
- if ( $wgWellFormedXml || $value == ''
+ if ( $wgWellFormedXml || $value === ''
|| preg_match( "/[ '=<>]/", $value ) ) {
$quote = '"';
} else {
|| preg_match( "/[ '=<>]/", $value ) ) {
$quote = '"';
} else {