Skip to content

Resolve Churn_Rate report DivisionByZeroError error#59

Open
safnz wants to merge 1 commit intoKatamaze:masterfrom
safnz:master
Open

Resolve Churn_Rate report DivisionByZeroError error#59
safnz wants to merge 1 commit intoKatamaze:masterfrom
safnz:master

Conversation

@safnz
Copy link
Copy Markdown

@safnz safnz commented Jul 28, 2025

With PHP 8.1 enforcing stricter error handling for div/0 scenarios, where there were no active services in a prior, the following month will trigger a "DivisionByZeroError" PHP error.

This fix wraps the calculations to detect if the prior month was 0, and if so, bypass the calculation and return 0.

Confirmed working on PHP 8.3.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant