Replace use of &$this
[lhc/web/wiklou.git] / includes / changes / ChangesList.php
index 9948040..1e88e13 100644 (file)
@@ -236,6 +236,9 @@ class ChangesList extends ContextSource {
 
        /**
         * Show formatted char difference
+        *
+        * Needs the css module 'mediawiki.special.changeslist' to style output
+        *
         * @param int $old Number of bytes
         * @param int $new Number of bytes
         * @param IContextSource $context
@@ -441,8 +444,10 @@ class ChangesList extends ContextSource {
 
                # TODO: Deprecate the $s argument, it seems happily unused.
                $s = '';
+               # Avoid PHP 7.1 warning from passing $this by reference
+               $changesList = $this;
                Hooks::run( 'ChangesListInsertArticleLink',
-                       [ &$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched ] );
+                       [ &$changesList, &$articlelink, &$s, &$rc, $unpatrolled, $watched ] );
 
                return "{$s} {$articlelink}";
        }