Make WordPress Core


Ignore:
Timestamp:
11/07/2012 05:49:00 PM (12 years ago)
Author:
nacin
Message:

Properly return new WP_Error objects. props bpetty. see #6812.

File:
1 edited

Legend:

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

    r22119 r22420  
    147147        }
    148148
    149         return WP_Error( 'image_resize_error', __('Image resize failed.'), $this->file );
     149        return new WP_Error( 'image_resize_error', __('Image resize failed.'), $this->file );
    150150    }
    151151
     
    223223        }
    224224
    225         return WP_Error( 'image_crop_error', __('Image crop failed.'), $this->file );
     225        return new WP_Error( 'image_crop_error', __('Image crop failed.'), $this->file );
    226226    }
    227227
     
    247247            }
    248248        }
    249         return WP_Error( 'image_rotate_error', __('Image rotate failed.'), $this->file );
     249        return new WP_Error( 'image_rotate_error', __('Image rotate failed.'), $this->file );
    250250    }
    251251
     
    274274            }
    275275        }
    276         return WP_Error( 'image_flip_error', __('Image flip failed.'), $this->file );
     276        return new WP_Error( 'image_flip_error', __('Image flip failed.'), $this->file );
    277277    }
    278278
Note: See TracChangeset for help on using the changeset viewer.