diff --git src/wp-admin/includes/image.php src/wp-admin/includes/image.php
index d8d5d5b34b..1d91f3533c 100644
|
|
function wp_generate_attachment_metadata( $attachment_id, $file ) { |
647 | 647 | * @since 2.5.0 |
648 | 648 | * |
649 | 649 | * @param string $str |
650 | | * @return int|float |
| 650 | * @return float|string Returns the fraction float, or the original string when |
| 651 | * the fraction can't be converted to a float. |
651 | 652 | */ |
652 | 653 | function wp_exif_frac2dec( $str ) { |
653 | 654 | if ( false === strpos( $str, '/' ) ) { |
… |
… |
function wp_read_image_metadata( $file ) { |
841 | 842 | $meta['copyright'] = trim( $exif['Copyright'] ); |
842 | 843 | } |
843 | 844 | if ( ! empty( $exif['FNumber'] ) ) { |
844 | | $meta['aperture'] = round( wp_exif_frac2dec( $exif['FNumber'] ), 2 ); |
| 845 | $meta['aperture'] = round( (float) wp_exif_frac2dec( $exif['FNumber'] ), 2 ); |
845 | 846 | } |
846 | 847 | if ( ! empty( $exif['Model'] ) ) { |
847 | 848 | $meta['camera'] = trim( $exif['Model'] ); |