Last modified: 2014-04-29 15:36:29 UTC
I've probably chosen the worst possible file as an example, but see this patch: https://gerrit.wikimedia.org/r/#/c/76208/ When MediaWiki source files declare variables in their top-level scope, the implicit assumption is that we are declaring them as global. However, if any part of the MediaWiki initialization code was called from within local (function-level) scope, PHP will no longer globally scope these variables. The only solution is to explicitly declare the variables with a top-level "global", anywhere we expect to refer to the variable from another file, i.e., for every global.
[removing patch-need-review keyword (meant for patches attached in Bugzilla)]
Patch was abandoned.