Skip to content

Commit

Permalink
revert change to sanitize_key_part()
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss authored Mar 12, 2024
1 parent 1c4f986 commit 5cd5c0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Reverted behavioral change to `sanitize_key_part()`

## 2.5.1

- Added timeouts to diagnostics
Expand Down
2 changes: 1 addition & 1 deletion includes/object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -2539,7 +2539,7 @@ public function fast_build_key( $key, $group = 'default' ) {
* @return string Sanitized string.
*/
protected function sanitize_key_part( $part ) {
return str_replace( ':', '-', is_scalar( $part ) ? (string) $part : '' );
return is_string( $part ) ? str_replace( ':', '-', $part ) : $part;
}

/**
Expand Down

1 comment on commit 5cd5c0c

@tillkruss
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 2f71bf1.

Please sign in to comment.