[BUGFIX] Crash after file upload on Windows without finfo 66/17466/4
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:24:05 +0000 (12:24 +0100)
commit631d583af28450d139237fcaf5982ed4bdcff104
treeffccc27b271bd8db2469fb63616b307714e2863a
parent53e0f6e118c4fa4e0893f3add893054137d2f7ff
[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/17466
Reviewed-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php