From 7dc483c1edf1fe30355b8d2fcdc501ea72f23f7c Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 2 Jul 2007 11:52:14 +0000 Subject: [PATCH] API: Fixing a bug that caused inprop=protection to scream when no existent titles were specified --- includes/api/ApiQueryInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 715c4a204e..f285c72f67 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -68,7 +68,7 @@ class ApiQueryInfo extends ApiQueryBase { $pageLatest = $pageSet->getCustomField('page_latest'); $pageLength = $pageSet->getCustomField('page_len'); - if ($fld_protection) { + if ($fld_protection && count($titles) > 0) { $this->addTables('page_restrictions'); $this->addFields(array('pr_page', 'pr_type', 'pr_level', 'pr_expiry')); $this->addWhereFld('pr_page', array_keys($titles)); -- 2.20.1