From e8bd5978b1c92e6bee455b1f1be0a9c5a0b46d77 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Thu, 5 Apr 2018 12:39:24 +0200 Subject: [PATCH] Swap isset by null check in ApiSetNotificationTimestamp/ApiPurge Change-Id: I1ebcbacf476a716d23b183dcbf379555ee1519dd --- includes/api/ApiPurge.php | 4 ++-- includes/api/ApiSetNotificationTimestamp.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index b7cfc2c6a2..bb0be68484 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -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 ); } diff --git a/includes/api/ApiSetNotificationTimestamp.php b/includes/api/ApiSetNotificationTimestamp.php index 5e7a63316c..f7dc4a78e9 100644 --- a/includes/api/ApiSetNotificationTimestamp.php +++ b/includes/api/ApiSetNotificationTimestamp.php @@ -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 ); } -- 2.20.1