r64987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64986‎ | r64987 | r64988 >
Date:05:31, 13 April 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fix to prevent crash on invalid page titles
Modified paths:
  • /trunk/extensions/DataTransfer/specials/DT_ImportCSV.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DataTransfer/specials/DT_ImportCSV.php
@@ -169,6 +169,10 @@
170170 $job_params['edit_summary'] = wfMsgForContent( 'dt_import_editsummary', 'CSV' );
171171 foreach ( $pages as $page ) {
172172 $title = Title::newFromText( $page->getName() );
 173+ if ( is_null( $title ) ) {
 174+ $text .= '<p>' . wfMsg( 'img-auth-badtitle', $page->getName() ) . "</p>\n";
 175+ continue;
 176+ }
173177 $job_params['text'] = $page->createText();
174178 $jobs[] = new DTImportJob( $title, $job_params );
175179 }

Status & tagging log