Index: branches/wmf/1.17wmf1/extensions/OAI/OAIRepo_body.php |
— | — | @@ -878,7 +878,12 @@ |
879 | 879 | array( 'img_name' => $this->_row->page_title ), |
880 | 880 | $fname ); |
881 | 881 | 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(); |
883 | 888 | |
884 | 889 | if( $url{0} == '/' ) { |
885 | 890 | global $wgServer; |
— | — | @@ -907,8 +912,6 @@ |
908 | 913 | } |
909 | 914 | return '<contributor>' . $tag . '</contributor>'; |
910 | 915 | } |
911 | | - |
912 | | - |
913 | 916 | } |
914 | 917 | |
915 | 918 | /** For the very first page output siteinfo, else same sa XmlDumpWriter */ |