From 925c6d0c36c540b92f5c61f69d9f7b374eea895d Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 4 Sep 2010 18:31:37 +0000 Subject: [PATCH] Make happy check-vars. This shows it that getQuery() returns an ApiQuery (more specifically, that getQuery() doesn't return an article) --- includes/api/ApiQueryBase.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 19790d4255..691dfea4f6 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -40,7 +40,7 @@ abstract class ApiQueryBase extends ApiBase { private $mQueryModule, $mDb, $tables, $where, $fields, $options, $join_conds; - public function __construct( $query, $moduleName, $paramPrefix = '' ) { + public function __construct( ApiQuery $query, $moduleName, $paramPrefix = '' ) { parent::__construct( $query->getMain(), $moduleName, $paramPrefix ); $this->mQueryModule = $query; $this->mDb = null; @@ -361,7 +361,8 @@ abstract class ApiQueryBase extends ApiBase { */ protected function getDB() { if ( is_null( $this->mDb ) ) { - $this->mDb = $this->getQuery()->getDB(); + $apiQuery = $this->getQuery(); + $this->mDb = $apiQuery->getDB(); } return $this->mDb; } -- 2.20.1