diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 047d9d3e8f..95662dc0b6 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -881,6 +881,11 @@ class Manager implements IManager { break; } + // If there was no limit on the select we are done + if ($limit === -1) { + break; + } + $offset += $added; // Fetch again $limit shares