[wp-trac] [WordPress Trac] #22181: image_make_intermediate_size in wp-includes/media.php always returns FALSE
WordPress Trac
wp-trac at lists.automattic.com
Sat Oct 13 05:45:43 UTC 2012
#22181: image_make_intermediate_size in wp-includes/media.php always returns FALSE
-----------------------------+--------------------------
Reporter: gandham | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: trunk | Severity: major
Keywords: has-patch |
-----------------------------+--------------------------
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;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22181>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list