Followup to r75266: remove warning "rvlimit may not be less than 1 (set to )" when...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 27 Oct 2010 11:50:20 +0000 (11:50 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 27 Oct 2010 11:50:20 +0000 (11:50 +0000)
includes/api/ApiQueryRevisions.php

index c660ab1..2d7e549 100644 (file)
@@ -210,6 +210,10 @@ class ApiQueryRevisions extends ApiQueryBase {
                        $this->generateXML = $params['generatexml'];
                        $this->parseContent = $params['parse'];
                        if ( $this->parseContent ) {
+                               // Must manually initialize unset limit
+                               if ( is_null( $limit ) ) {
+                                       $limit = 1;
+                               }
                                // We are only going to parse 1 revision per request
                                $this->validateLimit( 'limit', $limit, 1, 1, 1 );
                        }