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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T2174, the corresponding Phabricator task for complete and up-to-date bug report information.
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