Project

General

Profile

Actions

Bug #20153

closed

shortcut icon type detection does not work if allow_url_fopen is disabled

Added by Schmid Valentin over 15 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-03-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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 nothing (or a warning) if allow_url_fopen is disabled
and the second argument is an URL (which is the current state).

Here's my current workaround:

$favIcon = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->pSetup['shortcutIcon']);
$favIconPath = PATH_site . $GLOBALS['TSFE']->tmpl->getFileName($GLOBALS['TSFE']->pSetup['shortcutIcon']);
$iconMimeType = '';
if (function_exists('finfo_open')) {
if (($finfo = @finfo_open(FILEINFO_MIME))) {
$iconMimeType = ' type="' . finfo_file($finfo, $favIconPath) . '"';
finfo_close($finfo);
}
}

(simply added $favIconPath and use this var in finfo_file instead of $favIcon)

Probably 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.
See also:
http://bugs.typo3.org/view.php?id=1537
http://bugs.typo3.org/view.php?id=5757

(issue imported from #M10650)


Files

bug_10650.diff (794 Bytes) bug_10650.diff Administrator Admin, 2009-04-30 13:16
010650-favicon-v2.patch (1.06 KB) 010650-favicon-v2.patch Administrator Admin, 2009-10-13 10:16
010650-favicon-v3.patch (1.17 KB) 010650-favicon-v3.patch Administrator Admin, 2009-10-19 09:49
010650-favicon-v4.patch (1.04 KB) 010650-favicon-v4.patch Administrator Admin, 2009-10-19 09:49

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #15013: shortcut icon syntax incorrect/incompleteClosedMichael Stucki2005-10-08

Actions
Related to TYPO3 Core - Bug #17367: Add mime type "image/x-icon" to shortcut iconClosedIngo Renner2007-06-07

Actions
Actions

Also available in: Atom PDF