Only write checksum if we have a valid file info
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
268acd301d
commit
8152189b09
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue