From 5e8d27cc162aca290c1112c38e295d0651f93f9e Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 21 Dec 2010 02:57:33 +0000 Subject: [PATCH] Actually skip invalid titles in XML dumps, don't just say you're going to. Avoids fatal error. --- includes/ImportXMLReader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/ImportXMLReader.php b/includes/ImportXMLReader.php index 790d1a0d83..e221eaca06 100644 --- a/includes/ImportXMLReader.php +++ b/includes/ImportXMLReader.php @@ -619,9 +619,10 @@ class WikiImporter { if( is_null( $title ) ) { // Invalid page title? Ignore the page $this->notice( "Skipping invalid page title '$workTitle'" ); + return false; } elseif( $title->getInterwiki() != '' ) { $this->notice( "Skipping interwiki page title '$workTitle'" ); - $title = null; + return false; } return array( $origTitle, $title ); -- 2.20.1