Last modified: 2007-03-15 21:42:54 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 T11054, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9054 - Substed #if on empty parameter returns true and otherwise behaves oddly
Substed #if on empty parameter returns true and otherwise behaves oddly
Status: RESOLVED DUPLICATE of bug 5678
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/User:Sim...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-21 18:24 UTC by Danny B.
Modified: 2007-03-15 21:42 UTC (History)
0 users

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


Attachments

Description Danny B. 2007-02-21 18:24:30 UTC
Template {{tmp}} contains:
Lorem {{<includeonly>subst:</includeonly>#if:{{{1|}}}|foo [[{{{1}}}]]|bar}} ipsum

Calling {{subst:tmp|x}} gives (correct):
Lorem foo _x_ ipsum

(_x_ = x is hyperlink)


Calling {{subst:tmp}} gives (incorrect):
Lorem foo [[foo [[{{{1}}}]]]] ipsum
Should give:
Lorem bar ipsum
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-02-22 01:50:16 UTC
Two weird things:

1) It picked the true branch when the condition should have been false

2) The output was mangled in a bizarre fashion ({{{1}}} in the return string is
replaced by the proper return string, literal "foo [[{{{1}}}]]", so we get
literal "foo [[foo [[{{{1}}}]]]]")
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-03-15 21:42:54 UTC

*** This bug has been marked as a duplicate of 5678 ***

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


Navigation
Links