diff options
-rw-r--r-- | lib/private/Share20/Manager.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 6546fc48141..b4c4c7292fd 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1053,6 +1053,11 @@ class Manager implements IManager { } } + // If we did not fetch more shares than the limit then there are no more shares + if (count($shares) < $limit) { + break; + } + if (count($shares2) === $limit) { break; } |