Swap isset by null check in ApiSetNotificationTimestamp/ApiPurge

Change-Id: I1ebcbacf476a716d23b183dcbf379555ee1519dd
This commit is contained in:
Umherirrender 2018-04-05 12:39:24 +02:00
parent 41b2cb25bd
commit e8bd5978b1
2 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ use MediaWiki\MediaWikiServices;
* @ingroup API
*/
class ApiPurge extends ApiBase {
private $mPageSet;
private $mPageSet = null;
/**
* Purges the cache of a page
@ -132,7 +132,7 @@ class ApiPurge extends ApiBase {
* @return ApiPageSet
*/
private function getPageSet() {
if ( !isset( $this->mPageSet ) ) {
if ( $this->mPageSet === null ) {
$this->mPageSet = new ApiPageSet( $this );
}

View file

@ -30,7 +30,7 @@ use MediaWiki\MediaWikiServices;
*/
class ApiSetNotificationTimestamp extends ApiBase {
private $mPageSet;
private $mPageSet = null;
public function execute() {
$user = $this->getUser();
@ -187,7 +187,7 @@ class ApiSetNotificationTimestamp extends ApiBase {
* @return ApiPageSet
*/
private function getPageSet() {
if ( !isset( $this->mPageSet ) ) {
if ( $this->mPageSet === null ) {
$this->mPageSet = new ApiPageSet( $this );
}