[PR #869] [MERGED] Fix ldap_contacts error running under php8.2 & remove unused and correct ldap .env variable #1105

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

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/869
Author: @Shadow243
Created: 1/16/2024
Status: Merged
Merged: 1/31/2024
Merged by: @kroky

Base: masterHead: ldap-contact-error-with-php82


📝 Commits (1)

  • 8a8a3e5 Fix ldap_contacts error running under php8.2 & remove unused and correct ldap .env variable

📊 Changes

3 files changed (+62 additions, -60 deletions)

View changed files

📝 .env.example (+9 -6)
📝 config/carddav.php (+4 -2)
📝 config/ldap.php (+49 -52)

📄 Description

Issue: Resolve Array Key Exists Error in Cypht with PHP 8.2

Problem Description:

Under the PHP 8.2 environment in Cypht, an error is encountered in the ldap_contacts module, specifically on line 320. The error is related to array_key_exists() where a string is given instead of an array. Notably, this error is not displayed under PHP 7.4. The issue occurs on pages such as settings and compose, leading to an error page.

Steps to Reproduce:

  1. Set up Cypht with PHP 8.2.
  2. Navigate to the settings or compose page.
  3. Observe the error related to array_key_exists() on line 320 in the ldap_contacts module.

Proposed Changes:

Code Modification:

  • Investigate and resolve the issue causing the array_key_exists() error in the ldap_contacts module under PHP 8.2.
  • Ensure compatibility with PHP 8.2, and 8.3 without compromising functionality in PHP 7.4.

Cleanup:

  • Remove unused environment variables from the .env.example file.
  • Rename the LDAP_AUTH variable in .env.example according to config/ldap.php file.

Additional Information:

  • The error seems specific to the interaction between Cypht and PHP 8.2.
  • No such error is observed when using PHP 7.4.
  • Clean up the environment variable configuration for better maintenance.

Environment:

  • PHP 8.2
  • Cypht
  • Ubuntu server on Digital Ocean

Steps to Test:

  1. Apply the code modifications.
  2. Confirm the error is resolved under PHP 8.2.
  3. Verify that functionality remains intact under PHP 7.4.
  4. Test the cleanup changes related to environment variables.

N/A


🔄 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/869 **Author:** [@Shadow243](https://github.com/Shadow243) **Created:** 1/16/2024 **Status:** ✅ Merged **Merged:** 1/31/2024 **Merged by:** [@kroky](https://github.com/kroky) **Base:** `master` ← **Head:** `ldap-contact-error-with-php82` --- ### 📝 Commits (1) - [`8a8a3e5`](https://github.com/cypht-org/cypht/commit/8a8a3e5515c1a7cdca3c08c37b1cfe7d3f7b96b1) Fix ldap_contacts error running under php8.2 & remove unused and correct ldap .env variable ### 📊 Changes **3 files changed** (+62 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+9 -6) 📝 `config/carddav.php` (+4 -2) 📝 `config/ldap.php` (+49 -52) </details> ### 📄 Description ## Issue: Resolve Array Key Exists Error in Cypht with PHP 8.2 ### Problem Description: Under the PHP 8.2 environment in Cypht, an error is encountered in the ldap_contacts module, specifically on line 320. The error is related to `array_key_exists()` where a string is given instead of an array. Notably, this error is not displayed under PHP 7.4. The issue occurs on pages such as settings and compose, leading to an error page. ### Steps to Reproduce: 1. Set up Cypht with PHP 8.2. 2. Navigate to the settings or compose page. 3. Observe the error related to `array_key_exists()` on line 320 in the ldap_contacts module. ### Proposed Changes: #### Code Modification: - Investigate and resolve the issue causing the `array_key_exists()` error in the ldap_contacts module under PHP 8.2. - Ensure compatibility with PHP 8.2, and 8.3 without compromising functionality in PHP 7.4. #### Cleanup: - Remove unused environment variables from the `.env.example` file. - Rename the LDAP_AUTH variable in `.env.example` according to `config/ldap.php` file. ### Additional Information: - The error seems specific to the interaction between Cypht and PHP 8.2. - No such error is observed when using PHP 7.4. - Clean up the environment variable configuration for better maintenance. ### Environment: - PHP 8.2 - Cypht - Ubuntu server on Digital Ocean ### Steps to Test: 1. Apply the code modifications. 2. Confirm the error is resolved under PHP 8.2. 3. Verify that functionality remains intact under PHP 7.4. 4. Test the cleanup changes related to environment variables. ### Related Issues: N/A --- <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:15 +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#1105
No description provided.