Changeset 50146
- Timestamp:
- 02/02/2021 04:51:17 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r50129 r50146 3928 3928 $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); 3929 3929 3930 $size = @getimagesize( $cropped );3930 $size = getimagesize( $cropped ); 3931 3931 $image_type = ( $size ) ? $size['mime'] : 'image/jpeg'; 3932 3932 -
trunk/src/wp-admin/includes/class-custom-image-header.php
r49384 r50146 792 792 793 793 if ( file_exists( $file ) ) { 794 list( $width, $height, $type, $attr ) = @getimagesize( $file );794 list( $width, $height, $type, $attr ) = getimagesize( $file ); 795 795 } else { 796 796 $data = wp_get_attachment_metadata( $attachment_id ); … … 1224 1224 $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); 1225 1225 1226 $size = @getimagesize( $cropped );1226 $size = getimagesize( $cropped ); 1227 1227 $image_type = ( $size ) ? $size['mime'] : 'image/jpeg'; 1228 1228 -
trunk/src/wp-admin/includes/class-wp-site-icon.php
r49692 r50146 88 88 $url = str_replace( wp_basename( $parent_url ), wp_basename( $cropped ), $parent_url ); 89 89 90 $size = @getimagesize( $cropped );90 $size = getimagesize( $cropped ); 91 91 $image_type = ( $size ) ? $size['mime'] : 'image/jpeg'; 92 92 -
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 = 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 = getimagesize( $file ); 228 228 229 229 if ( empty( $imagesize ) ) { … … 688 688 } 689 689 690 list( , , $image_type ) = @getimagesize( $file );690 list( , , $image_type ) = getimagesize( $file ); 691 691 692 692 /* … … 717 717 */ 718 718 if ( is_callable( 'iptcparse' ) ) { 719 @getimagesize( $file, $info );719 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 = 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 = getimagesize( $path ); 896 918 if ( empty( $info ) ) { 897 919 $result = false; -
trunk/src/wp-includes/class-wp-image-editor-gd.php
r49927 r50146 106 106 } 107 107 108 $size = @getimagesize( $this->file );108 $size = getimagesize( $this->file ); 109 109 110 110 if ( ! $size ) { -
trunk/src/wp-includes/deprecated.php
r49992 r50146 1949 1949 if ( ($max_dims = apply_filters('attachment_max_dims', $max_dims)) && file_exists($src_file) ) { 1950 1950 1951 $imagesize = @getimagesize($src_file);1951 $imagesize = getimagesize($src_file); 1952 1952 1953 1953 if (($imagesize[0] > $max_dims[0]) || $imagesize[1] > $max_dims[1] ) { -
trunk/src/wp-includes/functions.php
r50140 r50146 3053 3053 $mime = ( $imagetype ) ? image_type_to_mime_type( $imagetype ) : false; 3054 3054 } elseif ( function_exists( 'getimagesize' ) ) { 3055 $imagesize = @getimagesize( $file );3055 $imagesize = getimagesize( $file ); 3056 3056 $mime = ( isset( $imagesize['mime'] ) ) ? $imagesize['mime'] : false; 3057 3057 } else { … … 7867 7867 return abs( (float) $expected - (float) $actual ) <= $precision; 7868 7868 } 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 -
trunk/src/wp-includes/media.php
r50144 r50146 245 245 246 246 if ( $thumb_file ) { 247 $info = @getimagesize( $thumb_file );247 $info = getimagesize( $thumb_file ); 248 248 } 249 249 … … 963 963 964 964 $src_file = $icon_dir . '/' . wp_basename( $src ); 965 list( $width, $height ) = @getimagesize( $src_file );965 list( $width, $height ) = getimagesize( $src_file ); 966 966 } 967 967 }
Note: See TracChangeset
for help on using the changeset viewer.