Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Changes for > 7.6.2 #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Classes/Domain/Model/FileReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class FileReference extends \TYPO3\CMS\Extbase\Domain\Model\FileReference {
protected $originalFileIdentifier;

/**
* @param \TYPO3\CMS\Core\Resource\FileReference $originalResource
*/
public function setOriginalResource(\TYPO3\CMS\Core\Resource\FileReference $originalResource) {
$this->originalResource = $originalResource;
$this->originalFileIdentifier = (int)$originalResource->getOriginalFile()->getUid();
}
* @param \TYPO3\CMS\Core\Resource\ResourceInterface $originalResource
*/
public function setOriginalResource(\TYPO3\CMS\Core\Resource\ResourceInterface $originalResource)
{
$this->originalResource = $originalResource;
$this->originalFileIdentifier = (int)$originalResource->getOriginalFile()->getUid();
Copy link
Owner

@helhum helhum Sep 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResourceInterface does not have the getOriginalFile() method.
Can you add a instance of FileReference check to avoid a potential fatal error?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I have pushed an new commit with the FileReference check

}
}