refreshLinks.php: Fix fatal when using --category parameter
authorJesús Martínez Novo <martineznovo@gmail.com>
Sun, 30 Jul 2017 13:39:36 +0000 (15:39 +0200)
committerJesús Martínez Novo <martineznovo@gmail.com>
Sun, 30 Jul 2017 13:39:36 +0000 (15:39 +0200)
A title object must be passed to refreshCategory(), which is created in
the above lines, not the string representation received as a parameter.

bug: T172061
Change-Id: Id579a86a26cb438c1866351064c6887dbcea23b0

maintenance/refreshLinks.php

index 3e1654a..578a226 100644 (file)
@@ -72,7 +72,7 @@ class RefreshLinks extends Maintenance {
                        if ( !$title ) {
                                $this->error( "'$category' is an invalid category name!\n", true );
                        }
-                       $this->refreshCategory( $category );
+                       $this->refreshCategory( $title );
                } elseif ( ( $category = $this->getOption( 'tracking-category', false ) ) !== false ) {
                        $this->refreshTrackingCategory( $category );
                } elseif ( !$this->hasOption( 'dfn-only' ) ) {