aboutsummaryrefslogtreecommitdiffstats
path: root/includes/libs/filebackend/SwiftFileBackend.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2022-02-26 17:28:48 +0100
committerUmherirrender <umherirrender_de.wp@web.de>2022-03-01 18:19:33 +0100
commit9efd9ca45ec67ca17fdbb00fd0242966d6692caf (patch)
tree817815ded23dfb5b1b71d9e3b9ed7d7023214bbc /includes/libs/filebackend/SwiftFileBackend.php
parentb042d6577643985624d0f4ee867806e30b14c16b (diff)
downloadmediawikicore-9efd9ca45ec67ca17fdbb00fd0242966d6692caf.tar.gz
mediawikicore-9efd9ca45ec67ca17fdbb00fd0242966d6692caf.zip
Add explicit casts between scalar types
* Some functions accept only string, cast ints and floats to string * After preg_matches or explode() casts numbers to int to do maths * Cast unix timestamps to int to do maths * Cast return values from timestamp format function to int * Cast bitwise operator to bool when needed as bool * php internal functions like floor/round/ceil documented to return float, most cases the result is used as int, added casts Found by phan strict checks Change-Id: Icb2de32107f43817acc45fe296fb77acf65c1786
Diffstat (limited to 'includes/libs/filebackend/SwiftFileBackend.php')
-rw-r--r--includes/libs/filebackend/SwiftFileBackend.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php
index b5abade8d9c3..d25ad9e88900 100644
--- a/includes/libs/filebackend/SwiftFileBackend.php
+++ b/includes/libs/filebackend/SwiftFileBackend.php
@@ -1768,7 +1768,7 @@ class SwiftFileBackend extends FileBackendStore {
if ( isset( $creds['auth_token'] ) && isset( $creds['storage_url'] ) ) {
$this->authCreds = $creds;
// Skew the timestamp for worst case to avoid using stale credentials
- $this->authSessionTimestamp = time() - ceil( $this->authTTL / 2 );
+ $this->authSessionTimestamp = time() - (int)ceil( $this->authTTL / 2 );
} else { // cache miss
list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( [
'method' => 'GET',