mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-09-23 10:22:54 +00:00
Remove PHP 5.3 $this closure workaround
Change-Id: I7f2b71823844e39339811ca4bee316b432b54adb
This commit is contained in:
parent
aecd6b7dda
commit
87e2d2ed18
|
@ -46,11 +46,10 @@ class Scribunto_LuaLanguageLibrary extends Scribunto_LuaLibraryBase {
|
|||
foreach ( $statics as $name ) {
|
||||
$lib[$name] = [ $this, $name ];
|
||||
}
|
||||
$ths = $this;
|
||||
foreach ( $methods as $name ) {
|
||||
$lib[$name] = static function () use ( $ths, $name ) {
|
||||
$lib[$name] = function () use ( $name ) {
|
||||
$args = func_get_args();
|
||||
return $ths->languageMethod( $name, $args );
|
||||
return $this->languageMethod( $name, $args );
|
||||
};
|
||||
}
|
||||
return $this->getEngine()->registerInterface( 'mw.language.lua', $lib );
|
||||
|
|
Loading…
Reference in a new issue