Robolisk Robolisk - 8 months ago 22
HTML Question

$params['proportion'] = $height/$width; cause a dividable by 0 error is the website and wordpress is what it's made in.

As you can see going to the website the warning is right there below the navigation bar. It says the issue is on line 125 which is this

$params['proportion'] = $height/$width;

the whole block of code is

if (count($background_image) && is_array($background_image)){
$width = $background_image[1];
$height = $background_image[2];
$params['proportion'] = $height/$width; //get height/width proportion
$params['background_image'] = 'background-image: url('.$background_image[0].')';

not sure why it's doing this.

Also, does anyone know what I would edit to slow down the speed of this slider?


$width value is 0. var_dump($width) will reveal it. Therefore you are trying to make a division by 0, which is mathematically impossible.