Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/104056
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/104056/1 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: newchange Gerrit-Change-Id: I95117c5cc73d187c8c7b859b67ad6655d196d91e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits