mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-14 19:30:57 +00:00
1617bb3deb
When an #invoke is passed as an argument to another #invoke, mw.getCurrentFrame() at module scope will return the wrong frame. On the PHP side, we need to always reset the frame when processing an #invoke, not just when there's no frame already. I don't remember why I82dde43e wasn't done that way, but changing it doesn't make any tests fail and Scribunto tends to have good tests. On the Lua side, we need to do the same. The logic wih mw.getCurrentFrame() using a global that gets stored, modified, and reset in several places was getting confusing, so this patch reworks the logic to inject a globalless mw.getCurrentFrame() into each #invoke's cloned environment instead. Bug: T234368 Change-Id: I8cb5bc4dc14c9b448c9f267e0539daa75e72af4c |
||
---|---|---|
.phan | ||
i18n | ||
includes | ||
modules | ||
tests | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.minus-x.json | ||
.phpcs.xml | ||
.stylelintrc.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
extension.json | ||
Gruntfile.js | ||
package-lock.json | ||
package.json | ||
Scribunto.constants.php | ||
Scribunto.magic.php | ||
Scribunto.namespaces.php |