From: Florianschmidtwelzow Date: Mon, 27 Apr 2015 09:51:53 +0000 (+0200) Subject: Remove throws from Title::getContentModel() X-Git-Tag: 1.31.0-rc.0~11573^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=0eeed48cc9d7dfd440a469d980a2738b36a13493;p=lhc%2Fweb%2Fwiklou.git Remove throws from Title::getContentModel() ContentHandler::getDefaultModelFor() always returns a contentmodel, so this exception is never thrown. Change-Id: I7678964f229da8fcd15eb49e9e8c8e9a258e35a1 --- diff --git a/includes/Title.php b/includes/Title.php index b0df15f044..7e2b39ecff 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -940,7 +940,6 @@ class Title { /** * Get the page's content model id, see the CONTENT_MODEL_XXX constants. * - * @throws MWException * @param int $flags A bit field; may be Title::GAID_FOR_UPDATE to select for update * @return string Content model id */ @@ -955,10 +954,6 @@ class Title { $this->mContentModel = ContentHandler::getDefaultModelFor( $this ); } - if ( !$this->mContentModel ) { - throw new MWException( 'Failed to determine content model!' ); - } - return $this->mContentModel; }