Similar to T248742. For instance:
includes/libs/Message/MessageValue.php:48 PhanUndeclaredThis Variable $this is undeclared
Note, this is not the same as PhanUndeclaredThis in other code paths.
Similar to T248742. For instance:
includes/libs/Message/MessageValue.php:48 PhanUndeclaredThis Variable $this is undeclared
Note, this is not the same as PhanUndeclaredThis in other code paths.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Fix another edge case interaction with phan | mediawiki/tools/phan/SecurityCheckPlugin | master | +45 -6 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T175865 CentralNotice banner goes behind of global user page's top menu buttons | |||
Declined | None | T254277 Proposal: Stop collapsing Vector menu items under more menu and removal associated code | |||
Resolved | Jdlrobson | T71729 [collapsibleTabs] If a tab's width changes after initial page load, endless animation loop can happen | |||
Resolved | BUG REPORT | ovasileva | T253819 Regression: Dancing Search Bar in MediaWiki when menu is hidden | ||
Resolved | Daimona | T254079 phan-seccheck typeerror | |||
Resolved | Jdforrester-WMF | T248630 Upgrade phan to 0.10.2 and remove phan-taint-check-plugin | |||
Resolved | Daimona | T249491 phan and taint-check weird interactions: PhanUndeclaredThis |
So, this one was harder than the other, and reproducing the issue wasn't easy, either. The problem arises when we try to compute the objects that a function could possibly return, but doing that from outside that function. To do that, we basically backup the variable map when first analyzing the function (from the inside), save it in the object representing the function, and retrieve it later when we need to collect the return values. This is because phan deletes the variable map in between, and this fix was explicitly suggested as a stable workaround (https://github.com/phan/phan/issues/2963). The problem is: for some reason, phan deletes the object where we saved the scope, hence we'll later receive another copy of that function, without the original scope, and actually, with no variables at all (including $this, which triggers the issue).
Change 586386 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/tools/phan/SecurityCheckPlugin@master] Fix another edge case interaction with phan
Change 586386 merged by jenkins-bot:
[mediawiki/tools/phan/SecurityCheckPlugin@master] Fix another edge case interaction with phan