runtime error

Support and queries relating to all previous versions of ZoneMinder
Locked
calixto
Posts: 27
Joined: Tue Feb 07, 2006 9:25 pm
Location: Weston, FL

runtime error

Post 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
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for this. In 1.22.1 the validation has been improved which hopefully will prevent this kind of error.
Phil
Locked