* Gracefully ignore non-legal titles in a <gallery>
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 15 Dec 2004 09:07:21 +0000 (09:07 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 15 Dec 2004 09:07:21 +0000 (09:07 +0000)
includes/Parser.php

index 17c52ad..a516cd8 100644 (file)
@@ -3103,6 +3103,10 @@ class Parser
                                continue;
                        }
                        $nt = Title::newFromURL( $matches[1] );
                                continue;
                        }
                        $nt = Title::newFromURL( $matches[1] );
+                       if( is_null( $nt ) ) {
+                               # Bogus title. Ignore these so we don't bomb out later.
+                               continue;
+                       }
                        if ( isset( $matches[3] ) ) {
                                $label = $matches[3];
                        } else {
                        if ( isset( $matches[3] ) ) {
                                $label = $matches[3];
                        } else {