Skip to content

fix: Deprecated strlen(null) in Redis Hashtable on PHP 8.1+#44

Open
jcdelepine wants to merge 1 commit intohorde:FRAMEWORK_6_0from
jcdelepine:FRAMEWORK_6_0
Open

fix: Deprecated strlen(null) in Redis Hashtable on PHP 8.1+#44
jcdelepine wants to merge 1 commit intohorde:FRAMEWORK_6_0from
jcdelepine:FRAMEWORK_6_0

Conversation

@jcdelepine
Copy link
Contributor

Problem

On PHP 8.1+, calling strlen(null) raises a deprecation warning in Redis Hashtable configuration when no password is set.

Solution

Replaced strlen() check with !empty() to ensure proper handling of null/empty passwords while preserving previous behavior.

Compatibility

  • No change in functionality.
  • Tested on PHP 8.4

### Problem
On PHP 8.1+, calling `strlen(null)` raises a deprecation warning in Redis Hashtable configuration when no password is set.

### Solution
Replaced `strlen()` check with `!empty()` to ensure proper handling of null/empty passwords while preserving previous behavior.

### Compatibility
- No change in functionality.
- Tested on PHP 8.4
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.

1 participant