Last modified: 2013-07-25 07:07:53 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 T27373, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25373 - conditional operator with () returns false
conditional operator with () returns false
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
AbuseFilter (Other open bugs)
unspecified
All All
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-30 05:32 UTC by aokomoriuta
Modified: 2013-07-25 07:07 UTC (History)
7 users (show)

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


Attachments
Patch to fix the short circuit activation for "if/then/else" evaluation (1.50 KB, patch)
2012-10-29 01:03 UTC, orlodrim
Details

Description aokomoriuta 2010-09-30 05:32:43 UTC
Conditional operators doesn't work well.

"(1 == 1) ? true : false" returns true,
but "(1 == 1) ? (true) : (false)" return false.

And also "if (1==1) then (true) else (false) end" return false, too.
Comment 1 orlodrim 2012-10-29 01:03:09 UTC
Created attachment 11254 [details]
Patch to fix the short circuit activation for "if/then/else" evaluation

It looks like ShortCircuit is enabled for the wrong branch of the condition in doLevelConditions (i.e. the branch used to compute the result is skipped, except for very simple cases). Here is a patch.
Comment 2 Nischay Nahata 2013-03-18 16:39:46 UTC
Thanks for the patch, can you directly submit your patch to gerrit so others can review it easier?

http://www.mediawiki.org/wiki/Gerrit
Comment 3 orlodrim 2013-03-18 19:05:46 UTC
Hi Nischay,
Sorry but I will not send patches for MediaWiki anymore, and I don't want to learn gerrit just for the two patches I have already proposed.
Comment 4 Quim Gil 2013-03-22 22:05:28 UTC
Just a note aside: I spoke with orlodrim@ and he explained that his reasons to leave are personal and not related to this bug report. He will indeed not push this patch to Gerrit. 

orlodrim, best wishes in your new projects! Maybe one day we'll see you around again.
Comment 5 Nischay Nahata 2013-03-23 05:42:56 UTC
I have applied the patch in https://gerrit.wikimedia.org/r/#/c/55453/ Please review!
Comment 6 Gerrit Notification Bot 2013-05-01 21:25:12 UTC
https://gerrit.wikimedia.org/r/55493 (Gerrit Change I2f2524731098f323e61bbc0442e7b56b11cdea37) | change APPROVED and MERGED [by jenkins-bot]
Comment 7 Marius Hoch 2013-05-02 09:52:48 UTC
Chris merged the change yesterday.

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


Navigation
Links