Skip to content

Commit

Permalink
Fix Call to a member function on null (Fix #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed May 28, 2021
1 parent 456a184 commit acad898
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions specials/SpecialOrderedWhatLinksHere.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,54 @@
<?php

use MediaWiki\Cache\LinkBatchFactory;
use MediaWiki\Content\IContentHandlerFactory;
use Wikimedia\Rdbms\IDatabase;
use Wikimedia\Rdbms\ILoadBalancer;

/**
* Implement for https://phabricator.wikimedia.org/T4306
*/
class SpecialOrderedWhatLinksHere extends SpecialWhatLinksHere {

/** @var ILoadBalancer */
private $loadBalancer;

/** @var LinkBatchFactory */
private $linkBatchFactory;

/** @var IContentHandlerFactory */
private $contentHandlerFactory;

/** @var SearchEngineFactory */
private $searchEngineFactory;

/** @var NamespaceInfo */
private $namespaceInfo;

/**
* @inheritDoc
*/
public function __construct(
ILoadBalancer $loadBalancer,
LinkBatchFactory $linkBatchFactory,
IContentHandlerFactory $contentHandlerFactory,
SearchEngineFactory $searchEngineFactory,
NamespaceInfo $namespaceInfo
) {
parent::__construct(
$loadBalancer,
$linkBatchFactory,
$contentHandlerFactory,
$searchEngineFactory,
$namespaceInfo
);
$this->loadBalancer = $loadBalancer;
$this->linkBatchFactory = $linkBatchFactory;
$this->contentHandlerFactory = $contentHandlerFactory;
$this->searchEngineFactory = $searchEngineFactory;
$this->namespaceInfo = $namespaceInfo;
}

/**
* Copied from REL1_36 without modification to replace private function showIndirectLinks.
*
Expand Down

0 comments on commit acad898

Please sign in to comment.