Closed sebastianthulin closed 6 months ago
@sebastianthulin: Do you want to open a PR? I'd probably use the null coalescing operator.
Certainly, I'll take care of that tomorrow. Thank you!
This seems to have been fixed by you 3 months ago like as follows:
return str_replace( ':', '-', is_scalar( $part ) ? (string) $part : '' );
This enhancement, however, has not yet been incorporated into a released version. Do you plan to make a new release in the near future?
https://github.com/rhubarbgroup/redis-cache/compare/2.5.0...develop
Right... I'll tag a version soon.
Description
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/stage/wp-content/object-cache.php on line 2538
Expected Behavior
The subject in the string replacement, should be checked if the type is valid before performing the string replacement. Thus avoiding throwing a warning.
Actual Behavior
A warning is thrown.
Possible Fix
Steps to Reproduce
Shows up randomly.
Additional context
Want the solution to not throw uncecessary errors.
Environment