From: Brad Jorsch Date: Sat, 7 Nov 2015 17:55:01 +0000 (-0500) Subject: ApiHelp: Fix undefined variable warning X-Git-Tag: 1.31.0-rc.0~9068 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=eea7d4ff1bbd20a3e6118cb22effef4e7e6598e7;p=lhc%2Fweb%2Fwiklou.git ApiHelp: Fix undefined variable warning Change-Id: I5b2790af9182dd76cd52be284f56e4833ac464c6 --- diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php index db7c149575..e587162b9c 100644 --- a/includes/api/ApiHelp.php +++ b/includes/api/ApiHelp.php @@ -310,6 +310,7 @@ class ApiHelp extends ApiBase { ); } + $flags = $module->getHelpFlags(); $help['flags'] .= Html::openElement( 'div', array( 'class' => 'apihelp-block apihelp-flags' ) ); $msg = $context->msg( 'api-help-flags' ); @@ -319,7 +320,7 @@ class ApiHelp extends ApiBase { ); } $help['flags'] .= Html::openElement( 'ul' ); - foreach ( $module->getHelpFlags() as $flag ) { + foreach ( $flags as $flag ) { $help['flags'] .= Html::rawElement( 'li', null, self::wrap( $context->msg( "api-help-flag-$flag" ), "apihelp-flag-$flag" ) );