| @@ -567,9 +567,9 @@ | ||
| 567 | 567 | |
| 568 | 568 | // Method 4: Ensure file extension matches MIME type. |
| 569 | 569 | $ext = \pathinfo( $file_path, PATHINFO_EXTENSION ); |
| 570 | 570 | |
| 571 | - if ( \strtolower( $ext ) !== $expected_ext ) { | |
| 571 | + if ( strtolower( $ext ) !== $expected_ext ) { | |
| 572 | 572 | $new_path = \preg_replace( '/\.[^.]+$/', '.' . $expected_ext, $file_path ); |
| 573 | 573 | if ( empty( $new_path ) || $new_path === $file_path ) { |
| 574 | 574 | $new_path = $file_path . '.' . $expected_ext; |
| 575 | 575 | } |