Index: trunk/extensions/Video/SpecialAddVideo.php |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | $video = Video::newFromName( $title ); |
135 | 135 | |
136 | 136 | // Page title for Video has already been taken |
137 | | - if( $video->exists() && !$destination ) { |
| 137 | + if( ( $video instanceof Video && $video->exists() ) && !$destination ) { |
138 | 138 | $error = '<div class="video-error">' . |
139 | 139 | wfMsgHtml( 'video-addvideo-exists' ) . '</div>'; |
140 | 140 | $wgOut->addHTML( $error ); |