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 for > 7.6.2 #26

wants to merge 2 commits into from

Conversation

Xippo
Copy link

@Xippo Xippo commented Sep 12, 2016

https://forge.typo3.org/issues/71567
Solves:
PHP Warning: Declaration of VENDOR\EXT\Domain\Model\FileReference::setOriginalResource(TYPO3\CMS\Core\Resource\FileReference $originalResource) should be compatible with TYPO3\CMS\Extbase\Domain\Model\FileReference::setOriginalResource(TYPO3\CMS\Core\Resource\ResourceInterface $originalResource) in /html/typo3/typo3conf/ext/EXT_NAME/Classes/Domain/Model/FileReference.php line 47

@Xippo Xippo changed the title Changes vor > 7.6.2 Changes for > 7.6.2 Sep 12, 2016
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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants