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

Unable to list feeds - alerts with "Error - 200: OK" with php 8.2 #36

Open
davefiddes opened this issue Jul 14, 2023 · 0 comments
Open

Comments

@davefiddes
Copy link
Contributor

Discovered on a fresh install of Emoncms using emonScripts updated to support php8.2 on Debian 12 "bookworm". Navigating to the Sync page displays a JavaScript alert "Error - 200: OK" and does not list feeds when the connection details for another emoncms are provided.

Investigating the response for the /sync/feed-list request shows a php warning:

<br />
<b>Deprecated</b>:  Creation of dynamic property Sync::$feed is deprecated in <b>/opt/emoncms/modules/sync/sync-module/sync_model.php</b> on line <b>29</b><br />
{"enphase_panel\/Back_East_LRW":...}
davefiddes added a commit to davefiddes/emoncms-sync that referenced this issue Jul 14, 2023
Issue emoncms#36 was caused by the $feed member variable in the Sync
class not being delcared in the class. This was permitted prior to
php 8.2 but will now raise a warning. The warning corrupts the JSON
output preventing the function from working.

Tests:
 - Sync several feed from an upstream stable emoncms instance
glynhudson added a commit that referenced this issue Sep 3, 2023
Add missing member variable in sync_model.php to fix issue #36
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

No branches or pull requests

1 participant