Last modified: 2007-03-15 21:42:54 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 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