Affected classes:
- ApiBase
- ApiPageSet
- HistoryPager
- RawAction
Bug: T153505
Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959
$queryInfo['options'],
$this->tagFilter
);
$queryInfo['options'],
$this->tagFilter
);
- Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$this, &$queryInfo ] );
+
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $historyPager = $this;
+ Hooks::run( 'PageHistoryPager::getQueryInfo', [ &$historyPager, &$queryInfo ] );
$response->statusHeader( 404 );
}
$response->statusHeader( 404 );
}
- if ( !Hooks::run( 'RawPageViewBeforeOutput', [ &$this, &$text ] ) ) {
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $rawAction = $this;
+ if ( !Hooks::run( 'RawPageViewBeforeOutput', [ &$rawAction, &$text ] ) ) {
wfDebug( __METHOD__ . ": RawPageViewBeforeOutput hook broke raw page output.\n" );
}
wfDebug( __METHOD__ . ": RawPageViewBeforeOutput hook broke raw page output.\n" );
}
*/
public function getFinalDescription() {
$desc = $this->getDescription();
*/
public function getFinalDescription() {
$desc = $this->getDescription();
- Hooks::run( 'APIGetDescription', [ &$this, &$desc ] );
+
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $apiModule = $this;
+ Hooks::run( 'APIGetDescription', [ &$apiModule, &$desc ] );
$desc = self::escapeWikiText( $desc );
if ( is_array( $desc ) ) {
$desc = implode( "\n", $desc );
$desc = self::escapeWikiText( $desc );
if ( is_array( $desc ) ) {
$desc = implode( "\n", $desc );
] + ( isset( $params['token'] ) ? $params['token'] : [] );
}
] + ( isset( $params['token'] ) ? $params['token'] : [] );
}
- Hooks::run( 'APIGetAllowedParams', [ &$this, &$params, $flags ] );
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $apiModule = $this;
+ Hooks::run( 'APIGetAllowedParams', [ &$apiModule, &$params, $flags ] );
$path = $this->getModulePath();
$desc = $this->getParamDescription();
$path = $this->getModulePath();
$desc = $this->getParamDescription();
- Hooks::run( 'APIGetParamDescription', [ &$this, &$desc ] );
+
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $apiModule = $this;
+ Hooks::run( 'APIGetParamDescription', [ &$apiModule, &$desc ] );
if ( !$desc ) {
$desc = [];
if ( !$desc ) {
$desc = [];
// populate this pageset with the generator output
if ( !$isDryRun ) {
$generator->executeGenerator( $this );
// populate this pageset with the generator output
if ( !$isDryRun ) {
$generator->executeGenerator( $this );
- Hooks::run( 'APIQueryGeneratorAfterExecute', [ &$generator, &$this ] );
+
+ // Avoid PHP 7.1 warning of passing $this by reference
+ $apiModule = $this;
+ Hooks::run( 'APIQueryGeneratorAfterExecute', [ &$generator, &$apiModule ] );
} else {
// Prevent warnings from being reported on these parameters
$main = $this->getMain();
} else {
// Prevent warnings from being reported on these parameters
$main = $this->getMain();