From 84e882968704febff2b4f0b3861e4e9845c5d4a4 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Thu, 17 Mar 2016 16:16:25 -0600 Subject: [PATCH] Cast API timeSpentBackend to an int Fixes {"timeSpentBackend":"Expected integer, but received double"} Avro encoding error. Bug: T108618 Change-Id: Iea79d14afe0ef0d1a9ea88096b7bbd90083df757 --- includes/api/ApiMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index f09c6f29fb..074cca538a 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' => [], -- 2.20.1