diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php index 9e04d57b28..7a48de6a11 100644 --- a/lib/private/share20/manager.php +++ b/lib/private/share20/manager.php @@ -906,6 +906,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