http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95170
Revision: 95170
Author: reedy
Date: 2011-08-21 18:41:46 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
MFT r95169
Modified Paths:
--------------
branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php
Modified: branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php 2011-08-21
18:39:24 UTC (rev 95169)
+++ branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php 2011-08-21
18:41:46 UTC (rev 95170)
@@ -878,7 +878,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;
@@ -907,8 +912,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