[ZBX-6114] Possibility of division by zero in zbx_avg (charts2.php) Created: 2013 Jan 14  Updated: 2017 May 30  Resolved: 2013 Jan 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.5rc1, 2.1.0
Fix Version/s: 2.0.5rc1, 2.1.0

Type: Incident report Priority: Minor
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Sometimes if item has no values zbx_avg function executes with errors:
1. Invalid argument for foreach
2. Division by zero.

It happens because $values variable does not contain array. It is "NULL".



 Comments   
Comment by Oleg Egorov (Inactive) [ 2013 Jan 22 ]

Now exist 2 errors in empty graphs:

Invalid argument supplied for foreach() [include\func.inc.php:668]
bcdiv(): Division by zero [include\func.inc.php:672]
Comment by Oleg Egorov (Inactive) [ 2013 Jan 22 ]

FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-6114 r.33001

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jan 22 ]

TESTED.

Comment by Oleg Egorov (Inactive) [ 2013 Jan 22 ]

FIXED IN 2.0.5rc1 r.33022, 2.1 r.33023
CLOSED

Generated at Fri Mar 29 10:22:40 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.