jenkins-bot has submitted this change and it was merged. Change subject: Throw exception when ArchivedFile::getUser() has unkown type ......................................................................
Throw exception when ArchivedFile::getUser() has unkown type Change-Id: I95117c5cc73d187c8c7b859b67ad6655d196d91e --- M includes/filerepo/file/ArchivedFile.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/filerepo/file/ArchivedFile.php b/includes/filerepo/file/ArchivedFile.php index 012dd84..26699c4 100644 --- a/includes/filerepo/file/ArchivedFile.php +++ b/includes/filerepo/file/ArchivedFile.php @@ -458,6 +458,7 @@ * the rest of the file classes. * @param string $type 'text' or 'id' * @return int|string + * @throws MWException */ public function getUser( $type = 'text' ) { $this->load(); @@ -467,6 +468,9 @@ } elseif ( $type == 'id' ) { return $this->user; } + + throw new MWException( "Unknown type '$type'." ); + } /** -- To view, visit https://gerrit.wikimedia.org/r/104056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95117c5cc73d187c8c7b859b67ad6655d196d91e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@wikimedia.org> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits