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]Hm_Carddav class: Declare the 'api' property to avoid deprecated dynamic property creation in PHP 8.2+ #1151

Conversation

Baraka24
Copy link
Member

@Baraka24 Baraka24 commented Aug 8, 2024

Steps to reproduce:

  1. Being on master login your Cypht
  2. Go to compose page
  3. Look at your apache error logs depending on your config: e.g. C:\Apache24\logs\error.log and get:
    PHP Deprecated: Creation of dynamic property Hm_Carddav::$api is deprecated in C:\\Apache24\\htdocs\\my_cypht\\modules\\carddav_contacts\\hm-carddav.php on line 38

Proposed fix

  • Added a private property $api to the Hm_Carddav class.
  • This fix addresses the deprecation warning in PHP 8.2+ for dynamic property creation.

@josaphatim josaphatim merged commit 7811877 into cypht-org:master Aug 9, 2024
6 checks passed
@Baraka24 Baraka24 deleted the add-private-property-api-to-Hm_Carddav-class branch August 13, 2024 15:31
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