Only write checksum if we have a valid file info

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2021-02-24 11:01:32 +01:00 committed by Roeland Jago Douma
parent 268acd301d
commit 8152189b09
1 changed files with 4 additions and 1 deletions

View File

@ -680,9 +680,12 @@ class File extends Node implements IFile {
/**
* Get the checksum for this file
*
* @return string
* @return string|null
*/
public function getChecksum() {
if (!$this->info) {
return null;
}
return $this->info->getChecksum();
}