commit 6c8bdf49c34f2424e6c16eae4a87bd0c9cda1963
parent c4605c429b83148b83a127523d7d71e8bdb67df0
Author: Jan Dankert <develop@jandankert.de>
Date: Wed, 14 Oct 2020 00:02:28 +0200
Fix: File must be loaded when loading the value.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/cms/generator/FileGenerator.class.php b/modules/cms/generator/FileGenerator.class.php
@@ -21,12 +21,14 @@ class FileGenerator extends BaseGenerator
protected function generate()
{
$file = new File( $this->context->sourceObjectId );
+ $file->load();
return $this->filterValue( $file );
}
public function getPublicFilename()
{
$file = new File( $this->context->sourceObjectId );
+ $file->load();
return $file->filename();
}