From: daniel Date: Fri, 19 Oct 2012 10:24:49 +0000 (+0200) Subject: (Bug 41178) Check whether content is null or false. X-Git-Tag: 1.31.0-rc.0~21946^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=189cc2f0f486ca3f3f0b791c48dedb18464a2511;p=lhc%2Fweb%2Fwiklou.git (Bug 41178) Check whether content is null or false. This is a follow-up to I7d629753. Change-Id: Id9e307fcbab5d28fe4fc4ec21b5a4882cffc6841 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 137a621dc2..17335e49bf 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -471,7 +471,7 @@ class EditPage { $content = $this->getContentObject(); # Use the normal message if there's nothing to display - if ( $this->firsttime && ( $content === false || $content->isEmpty() ) ) { + if ( $this->firsttime && ( !$content || $content->isEmpty() ) ) { $action = $this->mTitle->exists() ? 'edit' : ( $this->mTitle->isTalkPage() ? 'createtalk' : 'createpage' ); throw new PermissionsError( $action, $permErrors );