if we get a bad cat, spit a warning and *continue* processing the rest of the wiki :)
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Mar 2008 23:20:01 +0000 (23:20 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 19 Mar 2008 23:20:01 +0000 (23:20 +0000)
maintenance/populateCategory.inc

index 8acdaf5..3b006fe 100644 (file)
@@ -55,10 +55,10 @@ function populateCategory( $begin, $maxlag, $throttle, $force ) {
                # Use the row to update the category count
                $cat = Category::newFromName( $name );
                if( !is_object( $cat ) ) {
-                       var_dump( $cat );
-                       throw new MWException( "The category named $name is not valid?!" );
+                       echo "The category named $name is not valid?!\n";
+               } else {
+                       $cat->refreshCounts();
                }
-               $cat->refreshCounts();
 
                ++$i;
                if( !($i % REPORTING_INTERVAL) ) {