[BUGFIX] Replace split_fileref() by pathinfo() in ResourceStorage 73/38273/2
authorFrans Saris <franssaris@gmail.com>
Wed, 25 Mar 2015 19:43:05 +0000 (20:43 +0100)
committerFrans Saris <franssaris@gmail.com>
Sat, 4 Apr 2015 18:43:40 +0000 (20:43 +0200)
commitacde441fe056d3af014228c6dda5c709410a46eb
tree9d55debca75124b71e07897996fe17fc06c2e62b
parent6c9dcb66374c830bcfa8fcfb15aa082145ccad51
[BUGFIX] Replace split_fileref() by pathinfo() in ResourceStorage

GeneralUtility::split_fileref($fileName) expects the given $fileName to
be an existing file as it checks if the given file is a directory or
not using is_dir(). The ResourceStorage only provides the name of the
file without path when calling it.

Checking is_dir() on a file without correct path on systems with
open_basedir restrictions triggers the PHP Warning: 'is_dir():
open_basedir restriction in effect'.

Replace the calls to split_fileref() with PathUtility::pathinfo() as
this function doesn't check/care whether the path is real.

Document the behavior of split_fileref().

Resolves: #66033
Releases: master, 6.2
Change-Id: I5b4c953461ed3e9e374614a5ca6037842cc18546
Reviewed-on: http://review.typo3.org/38273
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php