[PR #1151] [MERGED] [FIX]Hm_Carddav class: Declare the 'api' property to avoid deprecated dynamic property creation in PHP 8.2+ #1304

Closed
opened 2026-02-25 21:37:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/1151
Author: @Baraka24
Created: 8/8/2024
Status: Merged
Merged: 8/9/2024
Merged by: @josaphatim

Base: masterHead: add-private-property-api-to-Hm_Carddav-class


📝 Commits (1)

  • 09a9206 [FIX]Hm_Carddav class: Declare the 'api' property to avoid deprecated dynamic property creation in PHP 8.2+

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 modules/carddav_contacts/hm-carddav.php (+1 -0)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/1151 **Author:** [@Baraka24](https://github.com/Baraka24) **Created:** 8/8/2024 **Status:** ✅ Merged **Merged:** 8/9/2024 **Merged by:** [@josaphatim](https://github.com/josaphatim) **Base:** `master` ← **Head:** `add-private-property-api-to-Hm_Carddav-class` --- ### 📝 Commits (1) - [`09a9206`](https://github.com/cypht-org/cypht/commit/09a920630ab745945a09bca3c4ae993f8ecf6587) [FIX]Hm_Carddav class: Declare the 'api' property to avoid deprecated dynamic property creation in PHP 8.2+ ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `modules/carddav_contacts/hm-carddav.php` (+1 -0) </details> ### 📄 Description ### 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:37:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#1304
No description provided.