From 6fff1a052916000cb06d030716178ff0b628bac7 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 27 Oct 2010 11:50:20 +0000 Subject: [PATCH] Followup to r75266: remove warning "rvlimit may not be less than 1 (set to )" when rvparse is set but rvlimit is not set --- includes/api/ApiQueryRevisions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index c660ab1cb5..2d7e549fa2 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -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 ); } -- 2.20.1