$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 ] );
return $queryInfo;
}
$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" );
}
*/
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 );
] + ( 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 ] );
return $params;
}
$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 = [];
// 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();