From: Roan Kattouw Date: Wed, 27 Oct 2010 11:50:20 +0000 (+0000) Subject: Followup to r75266: remove warning "rvlimit may not be less than 1 (set to )" when... X-Git-Tag: 1.31.0-rc.0~34276 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=6fff1a052916000cb06d030716178ff0b628bac7;p=lhc%2Fweb%2Fwiklou.git Followup to r75266: remove warning "rvlimit may not be less than 1 (set to )" when rvparse is set but rvlimit is not set --- 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 ); }