A critical arithmetic exception (division by zero) was occurring in the owner edit form initialization handler when attempting to calculate the average number of visits for owners with no pets.
Error ID: d60cbb62-3f3c-11f0-803c-42975a299f33
Root Cause:
- The code attempts to calculate average visits by dividing totalVisits by petCount without checking if petCount is zero
- Variable name typo (averageCisits instead of averageVisits)
Fix:
- Added null check before division
- Set default value of 0 for owners with no pets
- Fixed variable name typo
Related PRs:
The fix has been implemented in PR #111.
A critical arithmetic exception (division by zero) was occurring in the owner edit form initialization handler when attempting to calculate the average number of visits for owners with no pets.
Error ID: d60cbb62-3f3c-11f0-803c-42975a299f33
Root Cause:
Fix:
Related PRs:
The fix has been implemented in PR #111.