From 6f1f50667540f2baef075b84edc12fc0276fc8b0 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 12 Feb 2009 17:29:17 +0000 Subject: [PATCH] API: Prevent ApiQueryInfo from trying to set a continue value twice (which will fail with a fatal error) --- includes/api/ApiQueryInfo.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 0ffa1ae0d2..9c87b77943 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -435,6 +435,7 @@ class ApiQueryInfo extends ApiQueryBase { } $count = 0; + $fit = true; ksort($titles); // Ensure they're always in the same order foreach ( $titles as $pageid => $title ) { $count++; @@ -498,8 +499,9 @@ class ApiQueryInfo extends ApiQueryBase { } // Get properties for missing titles if requested - if(!is_null($params['token']) || $fld_protection || $fld_talkid || $fld_subjectid || - $fld_url || $fld_readable) + if($fit && (!is_null($params['token']) || $fld_protection || + $fld_talkid || $fld_subjectid || $fld_url || + $fld_readable)) { foreach($missing as $pageid => $title) { $count++; -- 2.20.1