Issue Bug Closed

#24481Missing favicon results in invalid html code

Thomas Koetter 01/05/11, 15:59 updated 10/02/18, 12:21

Description

On line 498 of class.tslib_pagegen.php the MIME type of the favicon is determined:
$iconMimeType = ‘ type=”’ . finfo_file($finfo, PATH_site . $favIcon) . ‘”’;

However, when the given file does not exist the result is “directory”. This is not a valid value for the type attribute of the link element. Therefore, the function should at least check for an existing file or for a valid MIME type.

(issue imported from #M16923)

Reviews 2