aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiMain.php
diff options
context:
space:
mode:
authorReedy <reedy@wikimedia.org>2019-02-25 00:38:33 +0000
committerReedy <reedy@wikimedia.org>2019-02-25 00:38:33 +0000
commit4691389fa46f79cbeaf2daffda407cf7daa66fd4 (patch)
treedc1898086c8f0eb41ff1ec3d5f380b4e5e4649dc /includes/api/ApiMain.php
parent5b6a8d4c57e3e601fbd8af6eebb22b372895f809 (diff)
downloadmediawikicore-4691389fa46f79cbeaf2daffda407cf7daa66fd4.tar.gz
mediawikicore-4691389fa46f79cbeaf2daffda407cf7daa66fd4.zip
Use (int) rather than intval()
Bug: T216969 Change-Id: I4c06716c83b69d128f26fa7f68736808aa2d3d64
Diffstat (limited to 'includes/api/ApiMain.php')
-rw-r--r--includes/api/ApiMain.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 3cc34070e264..634ebd167dff 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1277,8 +1277,8 @@ class ApiMain extends ApiBase {
if ( $lagInfo['lag'] > $maxLag ) {
$response = $this->getRequest()->response();
- $response->header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) );
- $response->header( 'X-Database-Lag: ' . intval( $lagInfo['lag'] ) );
+ $response->header( 'Retry-After: ' . max( (int)$maxLag, 5 ) );
+ $response->header( 'X-Database-Lag: ' . (int)$lagInfo['lag'] );
if ( $this->getConfig()->get( 'ShowHostnames' ) ) {
$this->dieWithError(