ignore invalid titles in getParentCategoryTree()
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 24 Aug 2006 17:35:42 +0000 (17:35 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 24 Aug 2006 17:35:42 +0000 (17:35 +0000)
includes/Title.php

index 6f740dc..7eae801 100644 (file)
@@ -2148,7 +2148,9 @@ class Title {
                                        $stack[$parent] = array();
                                } else {
                                        $nt = Title::newFromText($parent);
-                                       $stack[$parent] = $nt->getParentCategoryTree( $children + array($parent => 1) );
+                                       if ( $nt ) {
+                                               $stack[$parent] = $nt->getParentCategoryTree( $children + array($parent => 1) );
+                                       }
                                }
                        }
                        return $stack;