From cd557354614f1b94ffee175bec5d50773561f814 Mon Sep 17 00:00:00 2001 From: Parziphal Date: Mon, 2 Dec 2013 10:59:03 -0500 Subject: [PATCH] using jpeg's width and height in case sample's size isn't available. this will fix the error in post#show of the image having 0 width and height (thus not showing) if the image doesn't have a sample. --- app/views/post/show_partials/_image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/post/show_partials/_image.php b/app/views/post/show_partials/_image.php index 90734d9..7374915 100755 --- a/app/views/post/show_partials/_image.php +++ b/app/views/post/show_partials/_image.php @@ -19,8 +19,8 @@ 'alt' => $this->post->tags(), 'id' => 'image', 'class' => 'image', - 'width' => $file_sample['width'], - 'height' => $file_sample['height'], + 'width' => $file_sample['width'] ?: $jpeg['width'], + 'height' => $file_sample['height'] ?: $jpeg['height'], 'large_width' => $jpeg['width'], 'large_height' => $jpeg['height'])); ?> post->flash()) : ?>