From: Alexandre Emsenhuber Date: Tue, 1 Jul 2014 17:17:02 +0000 (+0200) Subject: Don't use isset() to check for null X-Git-Tag: 1.31.0-rc.0~15090^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=b025e69891446eeb50e9e63a5933b98c7231358a;p=lhc%2Fweb%2Fwiklou.git Don't use isset() to check for null Those two member variables are always defined. Change-Id: I7d1b9319bb1ce212f730a0568961eefb963fc7df --- diff --git a/includes/Message.php b/includes/Message.php index 826d55bfbc..950bcd5d20 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -995,7 +995,7 @@ class Message { * @throws MWException If message key array is empty. */ protected function fetchMessage() { - if ( !isset( $this->message ) ) { + if ( $this->message === null ) { $cache = MessageCache::singleton(); if ( is_array( $this->key ) ) { if ( !count( $this->key ) ) { @@ -1054,7 +1054,7 @@ class RawMessage extends Message { */ public function fetchMessage() { // Just in case the message is unset somewhere. - if ( !isset( $this->message ) ) { + if ( $this->message === null ) { $this->message = $this->key; } return $this->message; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 2a96891d20..f8b1b3ecd5 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -885,10 +885,7 @@ class OutputPage extends ContextSource { * @return string */ public function getPageTitleActionText() { - if ( isset( $this->mPageTitleActionText ) ) { - return $this->mPageTitleActionText; - } - return ''; + return $this->mPageTitleActionText; } /**