From 2259ecd6d76163d62b5cc0ab3b6e96e1833b961a Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Wed, 29 Dec 2010 20:32:14 +0000 Subject: [PATCH] Follow-up to r75282: don't query if there are no pages to query --- includes/api/ApiQueryPageProps.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/api/ApiQueryPageProps.php b/includes/api/ApiQueryPageProps.php index debf562906..6eb8b806dc 100644 --- a/includes/api/ApiQueryPageProps.php +++ b/includes/api/ApiQueryPageProps.php @@ -47,6 +47,10 @@ class ApiQueryPageProps extends ApiQueryBase { # Only operate on existing pages $pages = $this->getPageSet()->getGoodTitles(); + if ( !count( $pages ) ) { + # Nothing to do + return; + } $this->addTables( 'page_props' ); $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) ); -- 2.20.1