Opened 12 years ago
Closed 12 years ago
#22181 closed defect (bug) (fixed)
image_make_intermediate_size in wp-includes/media.php always returns FALSE
Reported by: | gandham | Owned by: | markoheijnen |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | major | Version: | 3.5 |
Component: | Media | Keywords: | has-patch commit needs-unit-tests |
Focuses: | Cc: |
Description
Found this when one of my theme user running 3.5 reported problem with thumbnails.
http://swiftthemes.com/forums/showthread.php?1958-here-we-go-again-thumbnail-featured-pics-dont-work-in-latest-build-of-wordpress&goto=newpost#post7055
In the following function, if statement is followed by a ;, so this always returns false.
function image_make_intermediate_size( $file, $width, $height, $crop = false ) { if ( $width || $height ) { $editor = WP_Image_Editor::get_instance( $file ); if ( is_wp_error( $editor ) || is_wp_error( $editor->resize( $width, $height, $crop ) ) ); return false; $resized_file = $editor->save(); if ( ! is_wp_error( $resized_file ) && $resized_file ) { unset( $resized_file['path'] ); return $resized_file; } } return false; }
Attachments (1)
Change History (7)
#1
@
12 years ago
- Component changed from General to Media
- Keywords commit added
- Milestone changed from Awaiting Review to 3.5
#4
@
12 years ago
- Owner set to markoheijnen
- Status changed from new to assigned
I will now look in to that.
Note: See
TracTickets for help on using
tickets.
Simple patch.