Skip to content

Commit b154dc1

Browse files
authored
Directly return if file hash not set (#128)
1 parent d137c53 commit b154dc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Service/FileHashLookupService.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public static function getFileNames(): array
9999

100100
public function getEtherpadVersionRange(string $fileName, ?string $hash): ?VersionRange
101101
{
102+
if ($hash === null) {
103+
return null;
104+
}
105+
102106
$versionRange = self::FILE_HASH_VERSIONS[$fileName][$hash] ?? null;
103107
if ($versionRange !== null) {
104108
return new VersionRange(

0 commit comments

Comments
 (0)