From 249022d65e4832ace60c17e17aa97838141a5706 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 5 Dec 2010 13:57:07 +0000 Subject: [PATCH] Converted WikiError to MWException so at least users can see the problem (nothing was checking the return value of WikiExporter::dumpFrom() and realted methods) --- includes/Export.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index bdb9d4af1f..22d6a1fe82 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -130,7 +130,7 @@ class WikiExporter { public function pageByName( $name ) { $title = Title::newFromText( $name ); if( is_null( $title ) ) { - return new WikiError( "Can't export invalid title" ); + throw new MWException( "Can't export invalid title" ); } else { return $this->pageByTitle( $title ); } @@ -251,12 +251,12 @@ class WikiExporter { # One, and only one hook should set this, and return false if( wfRunHooks( 'WikiExporter::dumpStableQuery', array(&$tables,&$opts,&$join) ) ) { wfProfileOut( __METHOD__ ); - return new WikiError( __METHOD__." given invalid history dump type." ); + throw new MWException( __METHOD__." given invalid history dump type." ); } } else { # Uknown history specification parameter? wfProfileOut( __METHOD__ ); - return new WikiError( __METHOD__." given invalid history dump type." ); + throw new MWException( __METHOD__." given invalid history dump type." ); } # Query optimization hacks if( $cond == '' ) { -- 2.20.1