jenkins-bot has submitted this change and it was merged.
Change subject: Remove throws from Title::getContentModel()
......................................................................
Remove throws from Title::getContentModel()
ContentHandler::getDefaultModelFor() always returns a contentmodel,
so this exception is never thrown.
Change-Id: I7678964f229da8fcd15eb49e9e8c8e9a258e35a1
---
M includes/Title.php
1 file changed, 0 insertions(+), 5 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Title.php b/includes/Title.php
index b0df15f..7e2b39e 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -940,7 +940,6 @@
/**
* 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
*/
@@ -953,10 +952,6 @@
if ( !$this->mContentModel ) {
$this->mContentModel =
ContentHandler::getDefaultModelFor( $this );
- }
-
- if ( !$this->mContentModel ) {
- throw new MWException( 'Failed to determine content
model!' );
}
return $this->mContentModel;
--
To view, visit https://gerrit.wikimedia.org/r/206765
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7678964f229da8fcd15eb49e9e8c8e9a258e35a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits