MediaFile->getFile() instead of accessing fileRecord
This commit is contained in:
parent
6f410eda5c
commit
015e95829b
@ -79,6 +79,15 @@ class MediaFile
|
||||
@unlink($filepath);
|
||||
}
|
||||
|
||||
public function getFile()
|
||||
{
|
||||
if (!$this->fileRecord instanceof File) {
|
||||
throw new ServerException('File record did not exist for MediaFile');
|
||||
}
|
||||
|
||||
return $this->fileRecord;
|
||||
}
|
||||
|
||||
protected function storeFile()
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user