From 4e5b1a4ecd2fbebce8bb4ba186f8fcc75ed749f3 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 2 May 2014 10:41:25 -0400 Subject: [PATCH] API: Fix prop=revisions&rvdiffto= without rvprop=content Make sure $this->section is initialized (and other stuff is checked) when rvdiffto is used. Bug: 64744 Change-Id: Ie6c50ad946ed5150819d004dabfe898a131a0a07 --- includes/api/ApiQueryRevisions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 61509953b6..41bc8d4d08 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -209,7 +209,7 @@ class ApiQueryRevisions extends ApiQueryBase { $this->addWhereFld( 'ct_tag', $params['tag'] ); } - if ( isset( $prop['content'] ) || !is_null( $this->difftotext ) ) { + if ( isset( $prop['content'] ) || !is_null( $this->diffto ) || !is_null( $this->difftotext ) ) { // For each page we will request, the user must have read rights for that page $user = $this->getUser(); /** @var $title Title */ -- 2.20.1