dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace use of &$this
[lhc/web/wiklou.git]
/
includes
/
deferred
/
LinksUpdate.php
diff --git
a/includes/deferred/LinksUpdate.php
b/includes/deferred/LinksUpdate.php
index
229a9a2
..
464c908
100644
(file)
--- a/
includes/deferred/LinksUpdate.php
+++ b/
includes/deferred/LinksUpdate.php
@@
-154,7
+154,9
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
$this->mRecursive = $recursive;
$this->mRecursive = $recursive;
- Hooks::run( 'LinksUpdateConstructed', [ &$this ] );
+ // Avoid PHP 7.1 warning from passing $this by reference
+ $linksUpdate = $this;
+ Hooks::run( 'LinksUpdateConstructed', [ &$linksUpdate ] );
}
/**
}
/**
@@
-169,7
+171,9
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
$scopedLock = self::acquirePageLock( $this->getDB(), $this->mId );
}
$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)
$this->doIncrementalUpdate();
// Commit and release the lock (if set)
@@
-177,7
+181,9
@@
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
// Run post-commit hooks without DBO_TRX
$this->getDB()->onTransactionIdle(
function () {
// 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__
);
},
__METHOD__
);