From: Bryan Tong Minh Date: Wed, 29 Dec 2010 20:32:14 +0000 (+0000) Subject: Follow-up to r75282: don't query if there are no pages to query X-Git-Tag: 1.31.0-rc.0~32998 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=2259ecd6d76163d62b5cc0ab3b6e96e1833b961a;p=lhc%2Fweb%2Fwiklou.git Follow-up to r75282: don't query if there are no pages to query --- 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' ) );