Author: stunami
Date: 2010-03-21 14:18:19 +0100 (Sun, 21 Mar 2010)
New Revision: 28644

Modified:
   plugins/sfImageTransformPlugin/trunk/lib/sfImage.class.php
Log:
Fixing bug with Fileinfo mime detection with PHP 5.3 


Modified: plugins/sfImageTransformPlugin/trunk/lib/sfImage.class.php
===================================================================
--- plugins/sfImageTransformPlugin/trunk/lib/sfImage.class.php  2010-03-21 
11:16:27 UTC (rev 28643)
+++ plugins/sfImageTransformPlugin/trunk/lib/sfImage.class.php  2010-03-21 
13:18:19 UTC (rev 28644)
@@ -500,6 +500,16 @@
 
         if(function_exists('finfo_file'))
         {
+          // Support for PHP 5.3+
+          if(defined(FILEINFO_MIME_TYPE))
+          {
+            $finfo = finfo_open(FILEINFO_MIME_TYPE);
+          }
+
+          else
+          {
+            $finfo = finfo_open(FILEINFO_MIME);
+          }
           $finfo = finfo_open(FILEINFO_MIME);
 
           return finfo_file($finfo, $filename);

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to