Files
wordpress/wp-includes
hellofromTonya 9ede1fe55b Formatting: Handle non-scalar types passed to sanitize_key().
`sanitize_key()` expects a string type for the given `key`. Passing any other data type to `strtolower()` can result in `E_WARNING: strtolower() expects parameter 1 to be string, array given`.

A check is added that if the key is not a string, the key is set to an empty string. For performance, the additional string processing is skipped if the key is an empty string.

This change maintains backwards-compatibility for valid string keys while fixing the bug of non-string keys.

Props costdev, dd32. 
Fixes #54160.
Built from https://develop.svn.wordpress.org/trunk@52292


git-svn-id: http://core.svn.wordpress.org/trunk@51884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 20:11:02 +00:00
..
2021-11-30 05:48:28 +00:00
2021-11-15 12:50:17 +00:00
2021-11-30 05:48:28 +00:00
2021-11-30 05:48:28 +00:00
2021-11-30 00:24:27 +00:00
2021-11-30 00:24:27 +00:00
2021-11-30 00:24:27 +00:00