Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update feed_model.php #517

Closed
wants to merge 2 commits into from
Closed

Update feed_model.php #517

wants to merge 2 commits into from

Conversation

AndyTaylorTweet
Copy link
Contributor

Added line 456 to mitigate divide by 0 errors;
This is NOT the correct way to fix this issue, this is a reference only to help some of you understand where the issue is.
I have not worked out yet where the variable $outinterval is supposed to be populated from, but at this point in the code its either null or 0 - and this un turn causes the divide by 0 errors.

My code simply detects when $outinterval is less than 1 and sets this variable to 1 before its used. (on line 457 in this version).

Applying my code appears to fix the connection issues with the android app, fixing the divide by zero cleaned that right up, but my fix may have other consequences (although quite unlikely).

Added line 456 to mitigate divide by 0 errors;
This is *NOT* the correct way to fix this issue, this is a reference only to help some of you understand where the issue is.
I have not worked out yet where the variable $outinterval is supposed to be populated from, but at this point in the code its either null or 0 - and this un turn causes the divide by 0 errors.

My code simply detects when $outinterval is less than 1 and sets this variable to 1 before its used. (on line 457 in this version).

Applying my code appears to fix the connection issues with the android app, fixing the divide by zero cleaned that right up, but my fix may have other consequences (although quite unlikely).
@glynhudson
Copy link
Member

This issue that caused the connection issues with the Android app has been fixed with an update to the Android app 1.2.2: https://community.openenergymonitor.org/t/android-app-connection-error/250/8

However I will keep this open for @TrystanLea to take a look

Add CSS to "Copy API Key" buttons, text labels shortened to keep the look consistent.
@AndyTaylorTweet
Copy link
Contributor Author

This latest commit is nothing to do with the first one, I'm going to close the PR and make a new one for the latest commit - the changes to feed_model.php were easy enough to find that I could do so again anyway.

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.

2 participants