Index: trunk/extensions/OAI/OAIRepo_body.php |
— | — | @@ -875,7 +875,12 @@ |
876 | 876 | array( 'img_name' => $this->_row->page_title ), |
877 | 877 | $fname ); |
878 | 878 | 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(); |
880 | 885 | |
881 | 886 | if( $url{0} == '/' ) { |
882 | 887 | global $wgServer; |
— | — | @@ -904,8 +909,6 @@ |
905 | 910 | } |
906 | 911 | return '<contributor>' . $tag . '</contributor>'; |
907 | 912 | } |
908 | | - |
909 | | - |
910 | 913 | } |
911 | 914 | |
912 | 915 | /** For the very first page output siteinfo, else same sa XmlDumpWriter */ |