Repository navigation
Add missing member variable in sync_model.php to fix issue #36 - #37
Merged
Merged
Conversation
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
Member
|
Thanks, will this be backwards compatible with PHP7? |
Contributor
Author
|
It should be fine but I haven't tested it. My change is just adding another member variable using the standard php class syntax. It seems to be just an omission and not an intentional use of a dynamic property. FWIW the rest of emoncms seems to work fine with php 8.2. The docs for php 8.2 explain the reasoning: https://wiki.php.net/rfc/deprecate_dynamic_properties |
Contributor
Unless something elsewhere is expecting it to be public, it is, yeah |
reedy
approved these changes
Aug 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #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: