From: Bryan Davis Date: Thu, 17 Mar 2016 22:16:25 +0000 (-0600) Subject: Cast API timeSpentBackend to an int X-Git-Tag: 1.31.0-rc.0~7584 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=84e882968704febff2b4f0b3861e4e9845c5d4a4;p=lhc%2Fweb%2Fwiklou.git Cast API timeSpentBackend to an int Fixes {"timeSpentBackend":"Expected integer, but received double"} Avro encoding error. Bug: T108618 Change-Id: Iea79d14afe0ef0d1a9ea88096b7bbd90083df757 --- 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' => [],