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>tags/v29.0.0beta6
@@ -1108,9 +1108,10 @@ class ShareByMailProvider implements IShareProvider { | |||
)); | |||
$cursor = $qb->executeQuery(); | |||
$public = $cursor->rowCount() > 0; | |||
$public = false; | |||
$mail = []; | |||
while ($row = $cursor->fetch()) { | |||
$public = true; | |||
if ($currentAccess === false) { | |||
$mail[] = $row['share_with']; | |||
} else { |