http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95169
Revision: 95169
Author: reedy
Date: 2011-08-21 18:39:24 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Bug 26304 - OAIRepository fatal error stops search indexing
Followup to r80770 which is currently fixme
Modified Paths:
--------------
trunk/extensions/OAI/OAIRepo_body.php
Modified: trunk/extensions/OAI/OAIRepo_body.php
===================================================================
--- trunk/extensions/OAI/OAIRepo_body.php 2011-08-21 18:31:06 UTC (rev
95168)
+++ trunk/extensions/OAI/OAIRepo_body.php 2011-08-21 18:39:24 UTC (rev
95169)
@@ -875,7 +875,12 @@
array( 'img_name' => $this->_row->page_title ),
$fname );
if( $imageRow ) {
- $url = wfFindFile( $imageRow->img_name )->getUrl();
+ $file = wfFindFile( $imageRow->img_name );
+ if ( !$file ) {
+ wfDebug( 'Invalid image row retrieved. Image
name: ' . $imageRow->img_name );
+ return '';
+ }
+ $url = $file->getUrl();
if( $url{0} == '/' ) {
global $wgServer;
@@ -904,8 +909,6 @@
}
return '<contributor>' . $tag . '</contributor>';
}
-
-
}
/** For the very first page output siteinfo, else same sa XmlDumpWriter */
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs