Issue Bug Closed

#19654typolink doesn't check internal files for extistence

Adrian Föder 11/28/08, 10:00 updated 09/09/13, 10:21

Description

Hello folks,

the typolink() function does not really check if the given link target file e.g. “fileadmin/templates/theFile.pdf” exists.
In the function code there is a section where the variable $isLocalFile is set to 2 when the link contains a slash. It is so in our case.

A few lines later there is
elseif ($containsSlash || $isLocalFile) {
…
if (@file_exists(rawurldecode($splitLinkParam0)) || $isLocalFile) {
[linkIt()]

Due to the OR and the value 2 set above the file will be linked although it may not exist.
I think it is a workaround due to SSD or realurl links, because they may look like internal file locations, but in my case it is definately a file location I would like to not being linked in case it does not exist.

Best,
adrian

(issue imported from #M9853)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.