WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/06/2012 07:56:04 AM (8 years ago)
Author:
nacin
Message:

Image editors: After cropping, request new sizes from the image. If we rely on the values passed in, they may be floats. We must see what the image results in.

Cast in update_size() for sanity.

props DH-Shredder.
fixes #22779.

File:
1 edited

Legend:

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

    r23038 r23103  
    186186    protected function update_size( $width = null, $height = null ) {
    187187        $this->size = array(
    188             'width' => $width,
    189             'height' => $height
     188            'width' => (int) $width,
     189            'height' => (int) $height
    190190        );
    191191        return true;
Note: See TracChangeset for help on using the changeset viewer.