"Division by zero" error with custom image template in: 5.6.3.1
PermalinkI made this template a couple of years ago but it seems to be triggering a "Division by zero" error - can anyone see what might be causing this?
Here's my template:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $ih = Loader::helper('image'); // load the c5 image helper $img = File::getByID($fID); // get the image $imgPath = $img->getURL(); // get the image path $imgTitle = $img->getTitle(); // get the image title $imgThumb = $ih->getThumbnail($img, $maxWidth, $maxHeight); // render thumb using the size entered in the block edit screen $linkURL = $controller->getLinkURL(); // get the link url $linkTitle = $controller->getaltText(); // get the link text ?> <p> <a class="pop-image" href="<?= $imgPath ?>" title="<?= $imgTitle ?>"> <img src="<?= $imgPath ?>" alt="<?= $imgTitle ?>" /> </a> </p>
Any pointers in the right direction would be much appreciated.
Cheers
Ben

Is that because there's nothing entered in the block edit window or because maxWidth/maxHeight aren't actually variables that are part of the block?
Cheers
Ben