Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/104058
Change subject: Throw exception for unknown field in SpecialListfiles::formatValue() ...................................................................... Throw exception for unknown field in SpecialListfiles::formatValue() Change-Id: I99fedfb28aaf9b09b5d9fee27020601f3c06e8d4 --- M includes/specials/SpecialListfiles.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/104058/1 diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 7484995..a65e9b0 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -386,6 +386,12 @@ UserCache::singleton()->doQuery( $userIds, array( 'userpage' ), __METHOD__ ); } + /** + * @param string $field + * @param string $value + * @return int|Message|mixed|string + * @throws MWException + */ function formatValue( $field, $value ) { switch ( $field ) { case 'thumb': @@ -446,6 +452,8 @@ // Messages: listfiles-latestversion-yes, listfiles-latestversion-no return $this->msg( 'listfiles-latestversion-' . $value ); } + + throw new MWException( "Unknown field '$field'" ); } function getForm() { -- To view, visit https://gerrit.wikimedia.org/r/104058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99fedfb28aaf9b09b5d9fee27020601f3c06e8d4 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