Fixed variable interpolation in DataOutputFormatter.php

Bug: T154369
Change-Id: Ib51165081797d3aa5e036e3fde771ac92e89baa3
This commit is contained in:
Yuriy Shnitkovskiy 2017-01-02 16:05:49 +02:00
parent 5291e5848b
commit a3784bef1d

View file

@ -165,8 +165,9 @@ class EchoDataOutputFormatter {
*/
protected static function formatNotification( EchoEvent $event, User $user, $format, $lang ) {
if ( isset( self::$formatters[$format] ) ) {
$class = self::$formatters[$format];
/** @var EchoEventFormatter $formatter */
$formatter = new self::$formatters[$format]( $user, $lang );
$formatter = new $class( $user, $lang );
return $formatter->format( $event );
} else {
return false;