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

Fix PHP 8.2 deprecation warnings for dynamic properties. #1014

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

kloor
Copy link
Contributor

@kloor kloor commented Dec 4, 2023

PHP 8.2 has deprecated dynamically created object properties. These two instances were found while using the insert_files_for_item global helper using the Url transfer strategy. I've resolved the issue by simply adding the properties. I set the visibility to protected due to the names having leading underscores, but I could see setting them to public to ensure that there would be no broken code. I could not find any instance of the properties being used by any other code within Omeka, but I suppose there is a very slight chance a plugin could expect the side effect of the properties being created.

@zerocrates
Copy link
Member

I've sometimes handled these with public declarations for the reason you state... here I think I agree that there's probably not an issue with having these be protected.

@zerocrates zerocrates merged commit f1449cb into omeka:master Dec 4, 2023
9 checks passed
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.

None yet

2 participants