stripslashes_deep does not gracefully handle objects
|Reported by:||sowsinsk||Owned by:|
The stripslashes_deep() function in formatting.php will throw a catchable fatal error if it encounters an object. This is because the function always call stripslashes() on the given argument unless the argument is an array. However, if you pass an array to stripslashes_deep(), and one of the elements of the array is an object, it will throw the fatal error.
I realize that this function is not normally called on object values, however I have had this problem when stripslashes_deep is called on the result of a get_comment($id, ARRAY_A) call. This is because that call to get_comment returns an array that, depending on if the wp cache is used to return a comment object that's already been retrieved and perhaps has additional object data embedded in the array, might have object data in it.