[TYPO3-core] RFC: #10650: shortcut icon type detection does not work if allow_url_fopen is disabled
Stefan Geith
typo3dev2008.nospam1 at geithware.de
Tue Oct 13 10:24:19 CEST 2009
Hi,
this is a SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=10650
Branches: Trunk
Problem:
The shortcut icon type detection in class.tslib_pagegen.php does not
work if allow_url_fopen is disabled.
Reason:
The finfo_file function returns a warning (at least with PHP 5.3) if
allow_url_fopen is disabled and the second argument is an URL (which is
the current state).
Solution:
Check for local file instead:
$favIconPath = PATH_site .
$GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->pSetup['shortcutIcon']);
...
$iconMimeType = ' type="' . finfo_file($finfo, $favIconPath) . '"';
Notes:
It would also be a better default using $iconMimeType =
'type="image/x-icon"' than the empty string
if the finfo_open function doesn't exist.
/Stefan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 010650-favicon-v2.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20091013/8c1525bd/attachment.txt
More information about the TYPO3-team-core
mailing list