From: Umherirrender Date: Thu, 5 Apr 2018 10:39:24 +0000 (+0200) Subject: Swap isset by null check in ApiSetNotificationTimestamp/ApiPurge X-Git-Tag: 1.31.0-rc.0~192^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=e8bd5978b1c92e6bee455b1f1be0a9c5a0b46d77;p=lhc%2Fweb%2Fwiklou.git Swap isset by null check in ApiSetNotificationTimestamp/ApiPurge Change-Id: I1ebcbacf476a716d23b183dcbf379555ee1519dd --- 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 ); }