r57805 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57804‎ | r57805 | r57806 >
Date:08:16, 16 October 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Check that $wgTitle is an object before calling $wgTitle->getNamespace(), was throwing fatal errors on command line
Modified paths:
  • /trunk/extensions/OggHandler/OggHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/OggHandler_body.php
@@ -587,7 +587,7 @@
588588 return true; //continue normal if iframes are "off" (maybe throw a warning in the future)
589589
590590 //make sure we are in the right namespace and iframe=true was called:
591 - if( $wgTitle->getNamespace() == NS_FILE &&
 591+ if( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE &&
592592 $wgRequest->getVal('iframe') == 'true' &&
593593 $wgEnableIframeEmbed &&
594594 $doOutput ){

Comments

#Comment by Nikerabbit (talk | contribs)   11:54, 16 October 2009

Why is there tab after if(?

#Comment by IAlex (talk | contribs)   12:02, 16 October 2009

That's a good question, I just added the "is_object( $wgTitle )" part and I didn't see the tab.

#Comment by Tim Starling (talk | contribs)   06:04, 15 December 2009

Michael's code always has tabs in funny places.

Status & tagging log