Only run stripslashes() in stripslashes_deep() for strings, not other scalar values. props Kawauso, knutsp. props coffee2code for [UT698]. fixes #18026.

git-svn-id: http://core.svn.wordpress.org/trunk@21292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-07-20 15:14:26 +00:00
parent dcb200efc9
commit 81ae841eba
1 changed files with 3 additions and 3 deletions

View File

@ -1380,8 +1380,8 @@ function addslashes_gpc($gpc) {
*
* @since 2.0.0
*
* @param array|string $value The array or string to be stripped.
* @return array|string Stripped array (or string in the callback).
* @param mixed $value The value to be stripped.
* @return mixed Stripped value.
*/
function stripslashes_deep($value) {
if ( is_array($value) ) {
@ -1391,7 +1391,7 @@ function stripslashes_deep($value) {
foreach ($vars as $key=>$data) {
$value->{$key} = stripslashes_deep( $data );
}
} else {
} elseif ( is_string( $value ) ) {
$value = stripslashes($value);
}