[BUGFIX] Add check if $fileObject is a correct instance 13/32713/6
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:41:27 +0000 (00:41 +0100)
commita7b0e3833faa92cc1dc0e9f3d93d456d0f9e4d57
tree80e5bd6b82f3c4b2ce2f41dd053c82dd5ec4ef8d
parent1fb57fc0bd0ea254b953b2d554850dc8da8f9188
[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/32713
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