Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-08 17:26:59 +0300
committerLouis Chemineau <louis@chmn.me>2022-08-22 21:03:52 +0300
commit6bb2c7a864fd9a6ba3ce96cc9e2f42daba635011 (patch)
tree284476b8726f0632bb844601ded658381883b4ef /lib
parent3b62ffb0f9cecd656823505dde0a9e754a76f820 (diff)
cast to int
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib')
-rw-r--r--lib/Album/AlbumMapper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Album/AlbumMapper.php b/lib/Album/AlbumMapper.php
index 1084b550..b88c3731 100644
--- a/lib/Album/AlbumMapper.php
+++ b/lib/Album/AlbumMapper.php
@@ -75,7 +75,7 @@ class AlbumMapper {
->where($query->expr()->eq('user', $query->createNamedParameter($userId)));
$rows = $query->executeQuery()->fetchAll();
return array_map(function (array $row) use ($userId) {
- return new AlbumInfo($row['album_id'], $userId, $row['name']);
+ return new AlbumInfo((int)$row['album_id'], $userId, $row['name']);
}, $rows);
}
@@ -120,11 +120,11 @@ class AlbumMapper {
$filesByAlbum = [];
$albumsById = [];
foreach ($rows as $row) {
- $albumId = $row['album_id'];
+ $albumId = (int)$row['album_id'];
if ($row['fileid']) {
$mimeId = $row['mimetype'];
$mimeType = $this->mimeTypeLoader->getMimetypeById($mimeId);
- $filesByAlbum[$albumId][] = new AlbumFile($row['fileid'], $row['file_name'], $mimeType, $row['size'], $row['mtime'], $row['etag']);
+ $filesByAlbum[$albumId][] = new AlbumFile((int)$row['fileid'], $row['file_name'], $mimeType, (int)$row['size'], (int)$row['mtime'], $row['etag']);
}
if (!isset($albumsById[$albumId])) {