Review main Merged

38221[BUGFIX] Replace split_fileref() by pathinfo() in ResourceStorage

Frans Saris CR +2 V +2 Easy +13 −14 updated 03/26/15, 20:54

Commit message

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().

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2