IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2377 | 2377 | $mime = false; |
2378 | 2378 | } |
2379 | 2379 | |
| 2380 | try { |
| 2381 | if ( false === $mime && function_exists( 'finfo_file' ) ) { |
| 2382 | // Use finfo_file if available to validate non-image files. |
| 2383 | $finfo = finfo_open( FILEINFO_MIME_TYPE ); |
| 2384 | $mime = finfo_file( $finfo, $file ); |
| 2385 | finfo_close( $finfo ); |
| 2386 | } |
| 2387 | } catch ( Exception $e ) { |
| 2388 | $mime = false; |
| 2389 | } |
| 2390 | |
2380 | 2391 | return $mime; |
2381 | 2392 | } |
2382 | 2393 | |