From: Roan Kattouw Date: Mon, 2 Jul 2007 11:52:14 +0000 (+0000) Subject: API: Fixing a bug that caused inprop=protection to scream when no X-Git-Tag: 1.31.0-rc.0~52290 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=7dc483c1edf1fe30355b8d2fcdc501ea72f23f7c;p=lhc%2Fweb%2Fwiklou.git API: Fixing a bug that caused inprop=protection to scream when no existent titles were specified --- 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));