Commit 2ce950f
authored
Fix incorrect URL generation in getContentUrl() (#3759)
trim($this->root, '/') strips the leading slash from the root path,
making strlen() return a value 1 less than expected. This causes
substr() to include an extra character from the root folder name
in the relative path.
For example, with root folder "images":
- Expected URL: /files/image.jpg
- Actual URL: /files/s/image.jpg
Using strlen($this->root) + 1 is consistent with other URL
construction methods in elFinderVolumeLocalFileSystem (lines 206,
612, 845, 1420) which all use this correct pattern.
Fixes #37461 parent ecdc053 commit 2ce950f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3331 | 3331 | | |
3332 | 3332 | | |
3333 | 3333 | | |
3334 | | - | |
| 3334 | + | |
3335 | 3335 | | |
3336 | 3336 | | |
3337 | 3337 | | |
| |||
0 commit comments