Merge "SpecialSearchResults hooks does not use by-ref anymore"
[lhc/web/wiklou.git] / includes / Revision.php
index aea8488..8721ef9 100644 (file)
@@ -1505,7 +1505,9 @@ class Revision implements IDBAccessObject {
                        );
                }
 
-               Hooks::run( 'RevisionInsertComplete', [ &$this, $data, $flags ] );
+               // Avoid PHP 7.1 warning of passing $this by reference
+               $revision = $this;
+               Hooks::run( 'RevisionInsertComplete', [ &$revision, $data, $flags ] );
 
                return $this->mId;
        }