From: Roan Kattouw Date: Thu, 12 Feb 2009 17:29:17 +0000 (+0000) Subject: API: Prevent ApiQueryInfo from trying to set a continue value twice (which will fail... X-Git-Tag: 1.31.0-rc.0~42919 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=6f1f50667540f2baef075b84edc12fc0276fc8b0;p=lhc%2Fweb%2Fwiklou.git API: Prevent ApiQueryInfo from trying to set a continue value twice (which will fail with a fatal error) --- 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++;