r99302 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99301‎ | r99302 | r99303 >
Date:10:27, 8 October 2011
Author:ashley
Status:deferred
Tags:
Comment:
Video: fix fatal error (Call to a member function exists() on a non-object in extensions/Video/SpecialAddVideo.php on line 136) reported by John du Hart on IRC
Modified paths:
  • /trunk/extensions/Video/SpecialAddVideo.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Video/SpecialAddVideo.php
@@ -133,7 +133,7 @@
134134 $video = Video::newFromName( $title );
135135
136136 // Page title for Video has already been taken
137 - if( $video->exists() && !$destination ) {
 137+ if( ( $video instanceof Video && $video->exists() ) && !$destination ) {
138138 $error = '<div class="video-error">' .
139139 wfMsgHtml( 'video-addvideo-exists' ) . '</div>';
140140 $wgOut->addHTML( $error );

Status & tagging log