Merge "Add 3D filetype for STL files"
[lhc/web/wiklou.git] / includes / page / CategoryPage.php
index 6d2be51..7dea271 100644 (file)
@@ -27,7 +27,7 @@
  */
 class CategoryPage extends Article {
        # Subclasses can change this to override the viewer class.
-       protected $mCategoryViewerClass = 'CategoryViewer';
+       public $mCategoryViewerClass = 'CategoryViewer';
 
        /**
         * @var WikiCategoryPage
@@ -54,7 +54,10 @@ class CategoryPage extends Article {
                        return;
                }
 
-               if ( !Hooks::run( 'CategoryPageView', [ &$this ] ) ) {
+               // Avoid PHP 7.1 warning of passing $this by reference
+               $categoryPage = $this;
+
+               if ( !Hooks::run( 'CategoryPageView', [ &$categoryPage ] ) ) {
                        return;
                }