Benjjj6 Posted October 18, 2007 Share Posted October 18, 2007 Hey, when I try to upload a picture for a subcategory the picture seems to upload but I get this error on the admin page Warning: Division by zero in /home/topgoth/public_html/admin/includes/functions/html_output.php on line 111 and on the customer side: Warning: Division by zero in /home/topgoth/public_html/includes/functions/html_output.php on line 144 what should I do :( The image just shows up as a very thin line on the subcategory page, as you can see here: http://www.topgoth.co.uk/brand-hoodies-c-125.html Heres the sections of the files you'll need: admin/includes/functions/html_output.php (line 111 is "$rx = $image_size[0] / $width;" // Scale the image if not the original size if ($image_size[0] != $width || $image_size[1] != $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } $image = '<img src="product_thumb.php?img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height) . '"'; } } elseif (IMAGE_REQUIRED == 'false') { return ''; } public_html/includes/functions/html_output.php (line 144 is " $rx = $image_size[0] / $width;") // Scale the image if not the original size if ($image_size[0] != $width || $image_size[1] != $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } $image = '<img src="product_thumb.php?img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height) . '"'; } thanks, tell me if you need more code Ben Link to comment Share on other sites More sharing options...
Benjjj6 Posted October 18, 2007 Author Share Posted October 18, 2007 hmmm it seems after all that I managed to solve it myself. I had sub category images set to 0 in the admin configuration options :rolleyes: However, I still get this problem on the admin side although I can live with that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.