There should be a check on FileInterface instance
dextar47 opened this issue · 6 comments
Hi,
I am using focuspoint in one of my projects. I was using its old ver and then i updated today and it gave fatal error. there is a function in FocusCropService class named as getCroppedImageSrcByFile and what it does it calls $file->getForLocalProcessing(false) which gives error because in $file there is object of TYPO3\CMS\Core\Resource\Folder and Folder or FolderInterface has no method named as getForLocalProcessing. so there should be a check something like https://github.com/lochmueller/focuspoint/blob/master/Classes/Service/FocusCropService.php#L57 would solve the problem i think. if you want a PR from me?
Nice. A PR would be cool... Perhaps you could run some debugging, why a folder object found the way into the Image-Scale process?!
yes i have checked it but due to some weird problem it gives src as null and image obj as FileReference and treadtIdAsReference is false in getViewHelperImage method. anyhow i have sent a PR with a check on $file obj type.
i was using your 2.1.5 tag but i think someone already gave PR to solve my problem, let me test your latest, don't merge PR yet
ah it worked the latest master worked. v2.1.5 had that problem but now fixed. thanks :-)
Sorry... i will release a new version in a few minutes.