From: umherirrender Date: Thu, 3 Dec 2015 17:59:56 +0000 (+0100) Subject: PHP 7 compatibility: Fix variable interpolation in ImageGalleryBase.php X-Git-Tag: 1.31.0-rc.0~8698^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=9d6357bed1e4a6e667b4ef455f616e7a6745cae2;p=lhc%2Fweb%2Fwiklou.git PHP 7 compatibility: Fix variable interpolation in ImageGalleryBase.php Bug: T115249 Change-Id: I772553cbddad4aa9296ad88877426e31b3d38bbb --- diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index c89c6b6c1e..9ea97029c3 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -98,7 +98,8 @@ abstract class ImageGalleryBase extends ContextSource { $mode = $wgContLang->lc( $mode ); if ( isset( self::$modeMapping[$mode] ) ) { - return new self::$modeMapping[$mode]( $mode, $context ); + $class = self::$modeMapping[$mode]; + return new $class( $mode, $context ); } else { throw new MWException( "No gallery class registered for mode $mode" ); }