Fix YET ANOTHER PHP WEAK TYPING BUG

Literal "0" was getting quoted.  Because, of course, 0 is equal to the
empty string.
This commit is contained in:
Aryeh Gregor 2009-09-06 15:08:10 +00:00
parent e476e97314
commit 1cdedb1d44

View file

@ -237,7 +237,7 @@ class Html {
# 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 {