From 0eeed48cc9d7dfd440a469d980a2738b36a13493 Mon Sep 17 00:00:00 2001 From: Florianschmidtwelzow Date: Mon, 27 Apr 2015 11:51:53 +0200 Subject: [PATCH] Remove throws from Title::getContentModel() ContentHandler::getDefaultModelFor() always returns a contentmodel, so this exception is never thrown. Change-Id: I7678964f229da8fcd15eb49e9e8c8e9a258e35a1 --- includes/Title.php | 5 ----- 1 file changed, 5 deletions(-) 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; } -- 2.20.1