diff --git a/CHANGELOG.md b/CHANGELOG.md index bf43a1ea..2acbca9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Reverted behavioral change to `sanitize_key_part()` + ## 2.5.1 - Added timeouts to diagnostics diff --git a/includes/object-cache.php b/includes/object-cache.php index e91a18e1..9ad8a0c1 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -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; } /**