[BUGFIX] Crash after file upload on Windows without finfo 49/18049/2
authorChristian Weiske <christian.weiske@netresearch.de>
Fri, 11 Jan 2013 15:52:54 +0000 (16:52 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 6 Feb 2013 11:25:18 +0000 (12:25 +0100)
commit995a493c28b1bc57539794eccad9429aea96608d
treefd1ac0aaca01703070179dbd21f399fa2392a8ac
parent7c7c56609a2f3c1e48f0b9405e028db1a92926a1
[BUGFIX] Crash after file upload on Windows without finfo

This patch checks if the finfo extension is available before using it
to determine the MIME type of a file.
If it is not available, the old function mime_content_type is used as
fallback.
When none of them are available, we give up.

This fixes a crash on Windows after uploading a file, since finfo
is by default not installed on PHP windows distributions.

Change-Id: I53a0eef3ee839c17ddaaeb303b9a0b9bae3ee485
Fixes: #37440
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/18049
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php