aboutsummaryrefslogtreecommitdiffstats
path: root/.phan
diff options
context:
space:
mode:
authorKunal Mehta <legoktm@member.fsf.org>2019-04-05 23:40:01 -0700
committerKunal Mehta <legoktm@member.fsf.org>2019-04-05 23:40:11 -0700
commite77937bbac44cf179800d4e6abc5fc391b1a9735 (patch)
tree7458e52b0c49c6c9303d9e6ce75ec2c63af04d3d /.phan
parent5f8d76336dba61aa6ce495a92e30367368aaa651 (diff)
downloadmediawikicore-e77937bbac44cf179800d4e6abc5fc391b1a9735.tar.gz
mediawikicore-e77937bbac44cf179800d4e6abc5fc391b1a9735.zip
Fix PhanPluginDuplicateExpressionBinaryOp in DjVuImage (#9)
== has a higher precedence operator than &. So the line `$chunkLength & 1 == 1` is interepreted as: `$chunkLength & true`. Probably not what was intended, but it actually works out because true is cast to 1, and the expression will either result with 0 (falsey) or 1 (truthy), and we were looking for it to equal 1 anyways. Incredible. I assume that it was supposed to be `( $chunkLength & 1 ) == 1`, so I've modified it to use that. Change-Id: If03823b9286e0d8282519949bf46e2ba4cca0843
Diffstat (limited to '.phan')
-rw-r--r--.phan/config.php2
1 files changed, 0 insertions, 2 deletions
diff --git a/.phan/config.php b/.phan/config.php
index 64197bf30d6c..c250bcd7eed9 100644
--- a/.phan/config.php
+++ b/.phan/config.php
@@ -90,8 +90,6 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
// approximate error count: 127
"PhanParamTooMany",
// approximate error count: 2
- "PhanPluginDuplicateExpressionBinaryOp",
- // approximate error count: 2
"PhanTraitParentReference",
// approximate error count: 30
"PhanTypeArraySuspicious",