dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d79c3b3
)
Cast API timeSpentBackend to an int
author
Bryan Davis
<bd808@wikimedia.org>
Thu, 17 Mar 2016 22:16:25 +0000
(16:16 -0600)
committer
Ori.livneh
<ori@wikimedia.org>
Thu, 17 Mar 2016 22:21:36 +0000
(22:21 +0000)
Fixes {"timeSpentBackend":"Expected integer, but received double"} Avro
encoding error.
Bug: T108618
Change-Id: Iea79d14afe0ef0d1a9ea88096b7bbd90083df757
includes/api/ApiMain.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiMain.php
b/includes/api/ApiMain.php
index
f09c6f2
..
074cca5
100644
(file)
--- 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' => [],