diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 58422b618..8c02e647d 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -28,7 +28,7 @@ jobs: strategy: matrix: php-versions: ['7.4', '8.0', '8.1'] - server-versions: ['master'] + server-versions: ['stable25'] steps: - name: Set app env diff --git a/lib/Controller/PreviewController.php b/lib/Controller/PreviewController.php index 2ad4e91ad..c19ea36e0 100644 --- a/lib/Controller/PreviewController.php +++ b/lib/Controller/PreviewController.php @@ -101,7 +101,7 @@ public function index( if (\count($nodes) === 0) { $receivedAlbums = $this->albumMapper->getAlbumsForCollaboratorIdAndFileId($user->getUID(), AlbumMapper::TYPE_USER, $fileId); - $receivedAlbums = array_udiff($receivedAlbums, $checkedAlbums, fn ($a, $b) => strcmp($a->getId(), $b->getId())); + $receivedAlbums = array_udiff($receivedAlbums, $checkedAlbums, fn ($a, $b) => ($a->getId() - $b->getId())); $nodes = $this->getFileIdForAlbums($fileId, $receivedAlbums); $checkedAlbums = array_merge($checkedAlbums, $receivedAlbums); } @@ -110,7 +110,7 @@ public function index( $userGroups = $this->groupManager->getUserGroupIds($user); foreach ($userGroups as $groupId) { $albumsForGroup = $this->albumMapper->getAlbumsForCollaboratorIdAndFileId($groupId, AlbumMapper::TYPE_GROUP, $fileId); - $albumsForGroup = array_udiff($albumsForGroup, $checkedAlbums, fn ($a, $b) => strcmp($a->getId(), $b->getId())); + $albumsForGroup = array_udiff($albumsForGroup, $checkedAlbums, fn ($a, $b) => ($a->getId() - $b->getId())); $nodes = $this->getFileIdForAlbums($fileId, $albumsForGroup); $checkedAlbums = array_merge($checkedAlbums, $receivedAlbums); if (\count($nodes) !== 0) {