* @file
*/
+use Wikimedia\Rdbms\IDatabase;
use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
# If the sortkey is longer then 255 bytes,
# it truncated by DB, and then doesn't get
# matched when comparing existing vs current
- # categories, causing bug 25254.
+ # categories, causing T27254.
# Also. substr behaves weird when given "".
if ( $sortkey !== '' ) {
$sortkey = substr( $sortkey, 0, 255 );
$this->mRecursive = $recursive;
- Hooks::run( 'LinksUpdateConstructed', [ &$this ] );
+ // Avoid PHP 7.1 warning from passing $this by reference
+ $linksUpdate = $this;
+ Hooks::run( 'LinksUpdateConstructed', [ &$linksUpdate ] );
}
/**
$scopedLock = self::acquirePageLock( $this->getDB(), $this->mId );
}
- Hooks::run( 'LinksUpdate', [ &$this ] );
+ // Avoid PHP 7.1 warning from passing $this by reference
+ $linksUpdate = $this;
+ Hooks::run( 'LinksUpdate', [ &$linksUpdate ] );
$this->doIncrementalUpdate();
// Commit and release the lock (if set)
// Run post-commit hooks without DBO_TRX
$this->getDB()->onTransactionIdle(
function () {
- Hooks::run( 'LinksUpdateComplete', [ &$this, $this->ticket ] );
+ // Avoid PHP 7.1 warning from passing $this by reference
+ $linksUpdate = $this;
+ Hooks::run( 'LinksUpdateComplete', [ &$linksUpdate, $this->ticket ] );
},
__METHOD__
);