Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

even faster image calculate size #oscommerce

  • Loading branch information...
commit 72883b7972b30e02ab0aeed9ce8a0c1974ab691c 1 parent 47d5f5f
@acidvertigo acidvertigo authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 catalog/includes/functions/html_output.php
View
6 catalog/includes/functions/html_output.php
@@ -88,13 +88,13 @@ function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')
if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
if ($image_size = @getimagesize($src)) {
- if (empty($width) && tep_not_null($height)) {
+ if (!$width && $height) {
$ratio = $height / $image_size[1];
$width = (int)($image_size[0] * $ratio);
- } elseif (tep_not_null($width) && empty($height)) {
+ } elseif ($width && !$height) {
$ratio = $width / $image_size[0];
$height = (int)($image_size[1] * $ratio);
- } elseif (empty($width) && empty($height)) {
+ } elseif (!$width && !$height) {
$width = $image_size[0];
$height = $image_size[1];
}
Please sign in to comment.
Something went wrong with that request. Please try again.