Skip to content
Snippets Groups Projects
Commit 05b26eb7 authored by Frans Saris's avatar Frans Saris
Browse files

[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: default avatarStephan Großberndt <stephan@grossberndt.de>
Tested-by: default avatarStephan Großberndt <stephan@grossberndt.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarJigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: default avatarJigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: default avatarFrans Saris <franssaris@gmail.com>
Tested-by: default avatarFrans Saris <franssaris@gmail.com>
parent 347ff472
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment