[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/38221 Reviewed-by:Stephan Großberndt <stephan@grossberndt.de> Tested-by:
Stephan Großberndt <stephan@grossberndt.de> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Jigal van Hemert <jigal.van.hemert@typo3.org> Tested-by:
Jigal van Hemert <jigal.van.hemert@typo3.org> Reviewed-by:
Frans Saris <franssaris@gmail.com> Tested-by:
Frans Saris <franssaris@gmail.com>
Please register or sign in to comment