summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/Sabre/VersionCollection.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/Sabre/VersionCollection.php')
-rw-r--r--apps/files_versions/lib/Sabre/VersionCollection.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_versions/lib/Sabre/VersionCollection.php b/apps/files_versions/lib/Sabre/VersionCollection.php
index a9c83fe475a..96a5e06bc25 100644
--- a/apps/files_versions/lib/Sabre/VersionCollection.php
+++ b/apps/files_versions/lib/Sabre/VersionCollection.php
@@ -55,6 +55,14 @@ class VersionCollection implements ICollection {
}
public function getChild($name) {
+ /** @var VersionFile[] $versions */
+ $versions = $this->getChildren();
+
+ foreach ($versions as $version) {
+ if ($version->getName() === $name) {
+ return $version;
+ }
+ }
throw new NotFound();
}