User "Catrope" posted a comment on MediaWiki.r94237.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/94237#c20621
Commit summary:

mediawiki.Title fix for IE.

In normal browsers the matches-array contains null/undefined if there's no 
match, IE returns an empty string.

Changing the checks to really validate that it's a non-empty string, which 
means that from now on mw.Title will also throw an error on "new 
mw.Title('');", which makes it consistent with the PHP backend 
(Title::newFromText('') return null instead of an object).

Adding unit test to make sure this behavior is tracked from now on.

The _name and _ext properties are either left to their default (null) or set to 
a valid value.

So reverting the checks from r94066, and instead checking for empty string 
inside the byteLimit callback, that way mw.Title will not get the empty string 
in the first place.

(Follows-up r94066 CR)

Comment:

The new test that checks <code>new mw.Title( '' )</code> throws an error 
succeeds in IE8 and IE9 (the latter seems to have never had the 
empty-string-instead-of-null bug to begin with) but fails in IE7: 
http://toolserver.org/~krinkle/testswarm/job/289

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to