Issue Task Under Review

#111511Simplify removing trailing slash in GeneralUtility::rmdir()

Chris Müller 11/19/26, 15:38 updated 11/19/26, 15:39

Description

There is no need to use a regular expression to remove a trailing slash from the path:

$path = preg_replace('|/$|', '', $path) ?? '';

can be written as

$path = rtrim($path, '/');

instead.

Reviews 1

History 01