r95169 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95168‎ | r95169 | r95170 >
Date:18:39, 21 August 2011
Author:reedy
Status:ok
Tags:
Comment:
Bug 26304 - OAIRepository fatal error stops search indexing

Followup to r80770 which is currently fixme
Modified paths:
  • /trunk/extensions/OAI/OAIRepo_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OAI/OAIRepo_body.php
@@ -875,7 +875,12 @@
876876 array( 'img_name' => $this->_row->page_title ),
877877 $fname );
878878 if( $imageRow ) {
879 - $url = wfFindFile( $imageRow->img_name )->getUrl();
 879+ $file = wfFindFile( $imageRow->img_name );
 880+ if ( !$file ) {
 881+ wfDebug( 'Invalid image row retrieved. Image name: ' . $imageRow->img_name );
 882+ return '';
 883+ }
 884+ $url = $file->getUrl();
880885
881886 if( $url{0} == '/' ) {
882887 global $wgServer;
@@ -904,8 +909,6 @@
905910 }
906911 return '<contributor>' . $tag . '</contributor>';
907912 }
908 -
909 -
910913 }
911914
912915 /** For the very first page output siteinfo, else same sa XmlDumpWriter */

Follow-up revisions

RevisionCommit summaryAuthorDate
r95170MFT r95169reedy18:41, 21 August 2011
r95628MFT to REL1_18 (extensions)...hashar15:32, 28 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80770Fixup deprecated method call fixme on r69995reedy21:09, 22 January 2011
r91364OAIRepo tweak: make the number of records returned in ListRecords requests co...brion18:40, 2 July 2011

Status & tagging log