Skip to content
Snippets Groups Projects
Commit 1324f835 authored by Robert Kärner's avatar Robert Kärner Committed by Georg Ringer
Browse files

[BUGFIX] Fix uninitialized string offset when renaming folder

On PHP 8.0, renaming a folder in the backend might fail
with a "PHP Warning: Uninitialized string offset 0". This
is fixed by utilizing the substr() function instead.

Resolves: #95273
Releases: master
Change-Id: Ib642a25492c933b6fae857206c4535b7a861cc3c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71123


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 0d6766d4
Branches
Tags
No related merge requests found
......@@ -397,7 +397,7 @@ class StorageRepository implements LoggerAwareInterface
}
// normalize path information (`//`, `../`)
$localPath = PathUtility::getCanonicalPath($localPath);
if ($localPath[0] !== '/') {
if (!str_starts_with($localPath, '/')) {
$localPath = '/' . $localPath;
}
$bestMatchStorageUid = 0;
......
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