http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97817

Revision: 97817
Author:   reedy
Date:     2011-09-22 15:08:32 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Guard against

PHP fatal error in /home/wikipedia/common/php-1.18/includes/Linker.php line 
831: 
Argument 1 passed to Linker::makeMediaLinkObj() must be an instance of Title, 
null given, called in /home/wikipedia/common/php-1.18/includes/Linker.php on 
line 1221 and defined

Modified Paths:
--------------
    trunk/phase3/includes/Linker.php

Modified: trunk/phase3/includes/Linker.php
===================================================================
--- trunk/phase3/includes/Linker.php    2011-09-22 14:57:08 UTC (rev 97816)
+++ trunk/phase3/includes/Linker.php    2011-09-22 15:08:32 UTC (rev 97817)
@@ -1234,7 +1234,9 @@
                        # Media link; trail not supported.
                        $linkRegexp = '/\[\[(.*?)\]\]/';
                        $title = Title::makeTitleSafe( NS_FILE, $submatch[1] );
-                       $thelink = self::makeMediaLinkObj( $title, $text );
+                       if ( $title ) {
+                               $thelink = self::makeMediaLinkObj( $title, 
$text );
+                       }
                } else {
                        # Other kind of link
                        if ( preg_match( $wgContLang->linkTrail(), $match[4], 
$submatch ) ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to