[BUGFIX] Add check if $fileObject is a correct instance 12/33612/2
authorFrank Nägler <typo3@naegler.net>
Wed, 10 Sep 2014 19:55:21 +0000 (21:55 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 29 Oct 2014 23:42:52 +0000 (00:42 +0100)
commitde7dbde7ce071168f44cf556d5878e4f1206e741
tree216e68bfc906f5390019a97ab1fa855f88bf1e6a
parentea22cdf1af2711e7ee9d44e60fa8ba02b48b536b
[BUGFIX] Add check if $fileObject is a correct instance

In some cases the $fileObject is null and getName() is called on
a null object which results in a fatal error.

This patch add a check if $fileObject is an instance of
FileInterface before call getName().
Also correct the wrong doc comment.

Resolves: #60773
Releases: 6.2, master
Change-Id: I6f3f817a089c665d8cc9e0b3369d6d690ffaf620
Reviewed-on: http://review.typo3.org/33612
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php