$this->mAttribs['rc_id'] = $dbw->insertId();
# Notify extensions
- Hooks::run( 'RecentChange_save', [ &$this ] );
+ // Avoid PHP 7.1 warning from passing $this by reference
+ $rc = $this;
+ Hooks::run( 'RecentChange_save', [ &$rc ] );
if ( count( $this->tags ) ) {
ChangeTags::addTags( $this->tags, $this->mAttribs['rc_id'],
throw new MWException( __FUNCTION__ . ": Unknown stream logger URI scheme: $scheme" );
}
+ if ( defined( 'MW_PHPUNIT_TEST' ) && is_object( $wgRCEngines[$scheme] ) ) {
+ return $wgRCEngines[$scheme];
+ }
return new $wgRCEngines[$scheme];
}