Make WordPress Core

Ticket #54385: 54385.3.diff

File 54385.3.diff, 574 bytes (added by adamsilverstein, 2 years ago)
  • src/wp-admin/includes/image.php

    diff --git src/wp-admin/includes/image.php src/wp-admin/includes/image.php
    index d8d5d5b34b..908f35d9b7 100644
    function wp_generate_attachment_metadata( $attachment_id, $file ) { 
    651651 */
    652652function wp_exif_frac2dec( $str ) {
    653653        if ( false === strpos( $str, '/' ) ) {
    654                 return $str;
     654                return (float) $str;
    655655        }
    656656
    657657        list( $numerator, $denominator ) = explode( '/', $str );
    658658        if ( ! empty( $denominator ) ) {
    659659                return $numerator / $denominator;
    660660        }
    661         return $str;
     661        return 0;
    662662}
    663663
    664664/**