Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php |
— | — | @@ -128,10 +128,12 @@ |
129 | 129 | if( $article->getTitle()->getNamespace() == NS_FILE ) { |
130 | 130 | |
131 | 131 | $file = wfFindFile( $article->getTitle() ); |
132 | | - $mediaType = $file->getHandler()->getMetadataType( $image = '' ); |
133 | | - |
134 | | - if( $mediaType == 'webm' || $mediaType == 'ogg' ){ |
135 | | - WebVideoTranscode::removeTranscodeJobs( $file ); |
| 132 | + if ( $file ) { |
| 133 | + $mediaType = $file->getHandler()->getMetadataType( $image = '' ); |
| 134 | + |
| 135 | + if( $mediaType == 'webm' || $mediaType == 'ogg' ){ |
| 136 | + WebVideoTranscode::removeTranscodeJobs( $file ); |
| 137 | + } |
136 | 138 | } |
137 | 139 | |
138 | 140 | } |