[wp-trac] [WordPress Trac] #10767: stripslashes_deep does not gracefully handle objects
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 10 20:27:05 UTC 2009
#10767: stripslashes_deep does not gracefully handle objects
--------------------------+-------------------------------------------------
Reporter: sowsinsk | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.8.4
Severity: normal | Keywords: stripslashes_deep
--------------------------+-------------------------------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10767>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list