[TYPO3-core] RFC: #10650: shortcut icon type detection does not work if allow_url_fopen is disabled

Susanne Moog typo3 at susannemoog.de
Sun Oct 18 15:02:01 CEST 2009


Hi,

Stefan Geith schrieb:
> 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.

aren't you using the wrong "else" part if you want to set this if the
finfo_open function doesn't exist? (and the wrong variable?)

You have in your code:
if ($finfo) {
    $iconMimeType = ' type="' . finfo_file($finfo, $favIconPath) . '"';
    finfo_close($finfo);
    $pageRenderer->setIconMimeType($iconMimeType);
} else {
    $iconMimeType = ' type="image/x-icon"';
}

Around it all you have the "if (function_exists('finfo_open'))" <- you
probably want to set the else part to that if.

Additionally the "$iconMimeType = ' type="image/x-icon"';" should be
given to the pagerenderer ($pageRenderer->setIconMimeType($iconMimeType);).

I hope you understand what I mean.

Best regards,

Susanne

-- 
Susanne Moog
NEUSTA GmbH - www.neusta.de


More information about the TYPO3-team-core mailing list