When Special:Permanentlink was not given any parameter it assumed oldid=0
and redirected to the Main_Page. This make it throw an error page instead.
* (bug 31674) Can't edit watchlist if it contains special pages
* (bug 32100) Installer complains about Suhosin GET limit even if it is
already set above 1024 bytes
+* (bug 32086) Special:PermanentLink now show an error message when no subpage
+ was specified.
=== API changes in 1.18 ===
* BREAKING CHANGE: action=watch now requires POST and token.
function getRedirect( $subpage ) {
$subpage = intval( $subpage );
+ if( $subpage === 0 ) {
+ # throw an error page when no subpage was given
+ throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
+ }
$this->mAddedRedirectParams['oldid'] = $subpage;
return true;
}