r110507 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110506‎ | r110507 | r110508 >
Date:18:14, 1 February 2012
Author:gregchiasson
Status:ok
Tags:aft 
Comment:
AFT5: Immediately bail if no param is given. Fixes ugly error when going to '.../Special:ArticleFeedbackv5/'
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php
@@ -74,6 +74,11 @@
7575 // set robot policy
7676 $out->setIndexPolicy('noindex');
7777
 78+ if( !$param ) {
 79+ $out->addWikiMsg( 'articlefeedbackv5-invalid-page-id' );
 80+ return;
 81+ }
 82+
7883 if( preg_match('/^(.+)\/(\d+)$/', $param, $m ) ) {
7984 $param = $m[1];
8085 }

Status & tagging log