Page 1 of 1

runtime error

Posted: Thu Feb 23, 2006 5:02 pm
by calixto
if during monitor setup, area was not set (0), next time you get back to this screen and set needed values, it gives an error of invalid division by zero in module zm_actions.php, linesm 1156 & 1157

$points[$i]['x'] = intval(round((($points[$i]['x']*$new_w)/$old_w)));
$points[$i]['y'] = intval(round((($points[$i]['y']*$new_h)/$old_h)));

it may be advisable to check for 0 before performing the division

Posted: Fri Feb 24, 2006 11:22 pm
by zoneminder
Thanks for this. In 1.22.1 the validation has been improved which hopefully will prevent this kind of error.