Issue Bug Closed

#16798The function t3lib_div::isAbsPath() doesn't work correctly on Windows.

Daniel Hoffmann 12/20/06, 11:04 updated 10/02/18, 12:31

Description

Running Typo3 on Windows, the function just checks if there is a ‘:/’ from position 1 to 2 in the path. On Unix, it checks for a starting ‘/’, and that should be done on Windows, too. So, just replace the line

return TYPO3_OS==‘WIN’ ? substr($path,1,2)==’:/’ : substr($path,0,1)==’/’;

with this one

return TYPO3_OS==‘WIN’ ? (substr($path,1,2)==’:/’ || substr($path,0,1)==’/’) : substr($path,0,1)==’/’;

in the function isAbsPath() (about line 3358)

This will check for both ‘:/’ and ‘/’ if running on Windows.

(issue imported from #M4676)

Reviews 2