wp-parsely
wp-parsely copied to clipboard
Audit value types passed to wp_cache_set()
We might be too permissive regarding the values we store in cache.
For example, $post_id here could be int|\WP_Error, but we're storing it even if it is a WP_Error. In another couple of places in the same file, we're storing a value that's \WP_Post[]|int[] (which might be desired though).
In conclusion, we should audit all uses of wp_cache_set() in order to see if extra handling or type checking is needed.