From 861c96fc1d9fbee45c2bec8ff6918118c745cc20 Mon Sep 17 00:00:00 2001 From: arajcany Date: Thu, 6 Oct 2022 17:39:54 +1100 Subject: [PATCH] Convert mtime to integer The B2_FILE_INFO_MTIME sometime returns the mtime as a string - function requires integer return type. --- src/Object/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Object/File.php b/src/Object/File.php index 2efe0eb..f5b53db 100644 --- a/src/Object/File.php +++ b/src/Object/File.php @@ -485,7 +485,7 @@ public function setPartNumber($partNumber): File public function lastModifiedTimestamp(?bool $milliseconds = true): ?int { if ($this->info) { - $t = $this->info->get(FileInfo::B2_FILE_INFO_MTIME, null); + $t = (int) $this->info->get(FileInfo::B2_FILE_INFO_MTIME, null); return $milliseconds ? $t : round($t / 1000); }