Skip to content

Commit 99c4f0e

Browse files
Merge 4144b0f into b9d546d
2 parents b9d546d + 4144b0f commit 99c4f0e

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public function getActivitySince(string $user, int $since, bool $byOthers) {
519519
$query->andWhere($query->expr()->neq('user', $nameParam));
520520
}
521521

522-
return $query->executeQuery()->fetch();
522+
return $query->executeQuery()->fetch() ?: [];
523523
}
524524

525525
/**

lib/FilesHooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ public function unShareSelf(IShare $share) {
826826
if (in_array($share->getNodeType(), ['file', 'folder'], true)) {
827827
if ($share->getShareType() === IShare::TYPE_GROUP) {
828828
$this->unshareFromSelfGroup($share);
829-
} else {
829+
} elseif ($share->getShareType() === IShare::TYPE_USER) {
830830
$this->unshareFromUser($share);
831831
}
832832
}

tests/FilesHooksTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,8 @@ public function testLeaveShare(): void {
962962
->willReturn('file');
963963
$share->method('getSharedWith')
964964
->willReturn('with');
965+
$share->method('getShareType')
966+
->willReturn(IShare::TYPE_USER);
965967

966968
$this->settings->expects($this->exactly(3))
967969
->method('getUserSetting')

0 commit comments

Comments
 (0)