r95170 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95169‎ | r95170 | r95171 >
Date:18:41, 21 August 2011
Author:reedy
Status:ok
Tags:
Comment:
MFT r95169
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php
@@ -878,7 +878,12 @@
879879 array( 'img_name' => $this->_row->page_title ),
880880 $fname );
881881 if( $imageRow ) {
882 - $url = wfFindFile( $imageRow->img_name )->getUrl();
 882+ $file = wfFindFile( $imageRow->img_name );
 883+ if ( !$file ) {
 884+ wfDebug( 'Invalid image row retrieved. Image name: ' . $imageRow->img_name );
 885+ return '';
 886+ }
 887+ $url = $file->getUrl();
883888
884889 if( $url{0} == '/' ) {
885890 global $wgServer;
@@ -907,8 +912,6 @@
908913 }
909914 return '<contributor>' . $tag . '</contributor>';
910915 }
911 -
912 -
913916 }
914917
915918 /** For the very first page output siteinfo, else same sa XmlDumpWriter */

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95169Bug 26304 - OAIRepository fatal error stops search indexing...reedy18:39, 21 August 2011

Status & tagging log