Changeset 50146 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 02/02/2021 04:51:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r49936 r50146 94 94 if ( ! empty( $image_meta['original_image'] ) ) { 95 95 $image_file = wp_get_original_image_path( $attachment_id ); 96 $imagesize = @getimagesize( $image_file );96 $imagesize = wp_getimagesize( $image_file ); 97 97 } 98 98 … … 225 225 */ 226 226 function wp_create_image_subsizes( $file, $attachment_id ) { 227 $imagesize = @getimagesize( $file );227 $imagesize = wp_getimagesize( $file ); 228 228 229 229 if ( empty( $imagesize ) ) { … … 688 688 } 689 689 690 list( , , $image_type ) = @getimagesize( $file );690 list( , , $image_type ) = wp_getimagesize( $file ); 691 691 692 692 /* … … 717 717 */ 718 718 if ( is_callable( 'iptcparse' ) ) { 719 @getimagesize( $file, $info );719 wp_getimagesize( $file, $info ); 720 720 721 721 if ( ! empty( $info['APP13'] ) ) { 722 $iptc = @iptcparse( $info['APP13'] ); 722 if ( 723 // Skip when running unit tests. 724 ! defined( 'DIR_TESTDATA' ) 725 && 726 // Process without silencing errors when in debug mode. 727 defined( 'WP_DEBUG' ) && WP_DEBUG 728 ) { 729 $iptc = iptcparse( $info['APP13'] ); 730 } else { 731 // phpcs:ignore WordPress.PHP.NoSilencedErrors -- Silencing notice and warning is intentional. See https://core.trac.wordpress.org/ticket/42480 732 $iptc = @iptcparse( $info['APP13'] ); 733 } 723 734 724 735 // Headline, "A brief synopsis of the caption". … … 780 791 781 792 if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types, true ) ) { 782 $exif = @exif_read_data( $file ); 793 if ( 794 // Skip when running unit tests. 795 ! defined( 'DIR_TESTDATA' ) 796 && 797 // Process without silencing errors when in debug mode. 798 defined( 'WP_DEBUG' ) && WP_DEBUG 799 ) { 800 $exif = exif_read_data( $file ); 801 } else { 802 // phpcs:ignore WordPress.PHP.NoSilencedErrors -- Silencing notice and warning is intentional. See https://core.trac.wordpress.org/ticket/42480 803 $exif = @exif_read_data( $file ); 804 } 783 805 784 806 if ( ! empty( $exif['ImageDescription'] ) ) { … … 878 900 */ 879 901 function file_is_valid_image( $path ) { 880 $size = @getimagesize( $path );902 $size = wp_getimagesize( $path ); 881 903 return ! empty( $size ); 882 904 } … … 893 915 $displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_ICO ); 894 916 895 $info = @getimagesize( $path );917 $info = wp_getimagesize( $path ); 896 918 if ( empty( $info ) ) { 897 919 $result = false;
Note: See TracChangeset
for help on using the changeset viewer.