Last modified: 2004-08-31 02:53:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 174 - 0 as an article name behaves strangely (numerical comparison in article-ids).
0 as an article name behaves strangely (numerical comparison in article-ids).
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: High trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/wiki/0
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-19 11:27 UTC by Daniel Kinzler
Modified: 2004-08-31 02:53 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2004-08-19 11:27:07 UTC
Using "0" (Zero) as an article name leads to strange results: 
* Entering 0 in the search field does not get you to the article, but to a
search page, just as if you had not entereed anything.
* Linking to the article "00" from inside "0" does not produce a link but a bold
"00", just as if "0" and "00" where identical for the software.

This leads me to think that in many places, == ist used to compare the
article-id instead of ===, and "not" is used to check if the name is empty,
instead of === "" and isset. The implicite conversion of strings to numbers in
PHP does make things tricky sometime - a string just containing a zero is equal
to False, an empty string is too. PHP is just not a nice language...

This problem will probably also occurr with article-names like "0815", wich
would be identical to "815", etc.
Comment 1 Brion Vibber 2004-08-31 02:53:35 UTC
Fixed in 1.4 CVS and for 1.3.3. Fix installed live.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links