Skip to content

Commit f45eb75

Browse files
committed
ShareByMailProvider: getAccessList: set correct value for 'public'
PDOStatement::rowCount behavior is undefined for SELECT statements for some database types, therefore manually set the value for 'public' based on actual results fetched. Signed-off-by: Adam Serbinski <adam@serbinski.com>
1 parent 01e3234 commit f45eb75

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sharebymail/lib/ShareByMailProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,9 +1108,10 @@ public function getAccessList($nodes, $currentAccess): array {
11081108
));
11091109
$cursor = $qb->executeQuery();
11101110

1111-
$public = $cursor->rowCount() > 0;
1111+
$public = false;
11121112
$mail = [];
11131113
while ($row = $cursor->fetch()) {
1114+
$public = true;
11141115
if ($currentAccess === false) {
11151116
$mail[] = $row['share_with'];
11161117
} else {

0 commit comments

Comments
 (0)