aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiMain.php
diff options
context:
space:
mode:
authorBryan Davis <bd808@wikimedia.org>2016-03-17 16:16:25 -0600
committerOri.livneh <ori@wikimedia.org>2016-03-17 22:21:36 +0000
commit84e882968704febff2b4f0b3861e4e9845c5d4a4 (patch)
treeacfde2ce52584f4708b5ed1702e46e05bafb592b /includes/api/ApiMain.php
parentd79c3b36b93bd6f814d363f584caf8f1f9bed09d (diff)
downloadmediawikicore-84e882968704febff2b4f0b3861e4e9845c5d4a4.tar.gz
mediawikicore-84e882968704febff2b4f0b3861e4e9845c5d4a4.zip
Cast API timeSpentBackend to an int
Fixes {"timeSpentBackend":"Expected integer, but received double"} Avro encoding error. Bug: T108618 Change-Id: Iea79d14afe0ef0d1a9ea88096b7bbd90083df757
Diffstat (limited to 'includes/api/ApiMain.php')
-rw-r--r--includes/api/ApiMain.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index f09c6f29fb24..074cca538a08 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1367,7 +1367,7 @@ class ApiMain extends ApiBase {
'ip' => $request->getIP(),
'userAgent' => $this->getUserAgent(),
'wiki' => wfWikiID(),
- 'timeSpentBackend' => round( $time * 1000 ),
+ 'timeSpentBackend' => (int) round( $time * 1000 ),
'hadError' => $e !== null,
'errorCodes' => [],
'params' => [],