MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/55491
Change subject: Special:ProtectedPages can result in whitepage when a bad title is protected. ...................................................................... Special:ProtectedPages can result in whitepage when a bad title is protected. Seen on wiki.mozilla.org. Original bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=853625 Bug: 46493 Change-Id: I801b73e0c20d80b7a70822db2e54a2b50bc70719 --- M includes/specials/SpecialProtectedpages.php 1 file changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/91/55491/1 diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index eec974f..e2c98a4 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -83,9 +83,6 @@ $infinity = wfGetDB( DB_SLAVE )->getInfinity(); } - $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); - $link = Linker::link( $title ); - $description_items = array (); $protType = wfMsgHtml( 'restriction-level-' . $row->pr_level ); @@ -98,6 +95,18 @@ $stxt = ''; $lang = $this->getLanguage(); + if(!is_null($size = $row->page_len)) { + $stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size ); + } + + $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); + if ( !$title ) { + return Html::rawElement( + 'li', + array(), + $lang->specialList( wfMsg("badtitle") . $stxt, $lang->commaList( $description_items ), false ) ) . "\n"; + } + $link = Linker::link( $title ); $expiry = $lang->formatExpiry( $row->pr_expiry, TS_MW ); if( $expiry != $infinity ) { @@ -110,10 +119,6 @@ ); $description_items[] = htmlspecialchars($expiry_description); - } - - if(!is_null($size = $row->page_len)) { - $stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size ); } # Show a link to the change protection form for allowed users otherwise a link to the protection log -- To view, visit https://gerrit.wikimedia.org/r/55491 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I801b73e0c20d80b7a70822db2e54a2b50bc70719 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_19 Gerrit-Owner: MarkAHershberger <mhershber...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits