Make WordPress Core

Changeset 20978


Ignore:
Timestamp:
06/02/2012 01:39:00 AM (14 years ago)
Author:
azaozz
Message:

Fix notice in wp_read_image_metadata() when EXIF ISOSpeedRatings is array, props nacin, fixes #20807

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image.php

    r20944 r20978  
    320320        if ( ! empty($exif['FocalLength'] ) )
    321321            $meta['focal_length'] = wp_exif_frac2dec( $exif['FocalLength'] );
    322         if ( ! empty($exif['ISOSpeedRatings'] ) )
    323             $meta['iso'] = utf8_encode( trim( $exif['ISOSpeedRatings'] ) );
     322        if ( ! empty($exif['ISOSpeedRatings'] ) ) {
     323            $meta['iso'] = is_array( $exif['ISOSpeedRatings'] ) ? reset( $exif['ISOSpeedRatings'] ) : $exif['ISOSpeedRatings'];
     324            $meta['iso'] = utf8_encode( trim( $meta['iso'] ) );
     325        }
    324326        if ( ! empty($exif['ExposureTime'] ) )
    325327            $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] );
  • trunk/wp-includes/js/plupload/handlers.dev.js

    r20580 r20978  
    418418            setResize( getUserSetting('upload_resize', false) );
    419419
    420             if ( up.features.dragdrop ) {
     420            if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) {
    421421                uploaddiv.addClass('drag-drop');
    422422                $('#drag-drop-area').bind('dragover.wp-uploader', function(){ // dragenter doesn't fire right :(
Note: See TracChangeset for help on using the changeset viewer.