Catchable fatal error on 3.6 update

image_resize (deprecated) is returning an error object so really, the problem is here: $new_img_path = image_resize( $file_path, $width, $height, $crop ); Something is wrong with that line and you are not checking whether the return value is an error object or a string before trying to use the return value as a string.

You did not post any code that might help me work out what is wrong with $new_img_path = image_resize( $file_path, $width, $height, $crop ); but at the very least you should do:

$new_img_path = image_resize( $file_path, $width, $height, $crop );
if( !is_wp_error()) {
    $new_img_size = getimagesize( $new_img_path );
    // ...

Converting to use WP_Image_Editor would be wiser though.

error code: 523