Sanitize post_author and comment_count as integer fields. props GeertDD. fixes #22324.
git-svn-id: http://core.svn.wordpress.org/trunk@23353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
72784ad6c2
commit
6f00a2c1cc
|
@ -1989,7 +1989,7 @@ function sanitize_post($post, $context = 'display') {
|
|||
* @return mixed Sanitized value.
|
||||
*/
|
||||
function sanitize_post_field($field, $value, $post_id, $context) {
|
||||
$int_fields = array('ID', 'post_parent', 'menu_order');
|
||||
$int_fields = array('ID', 'post_parent', 'menu_order', 'post_author', 'comment_count');
|
||||
if ( in_array($field, $int_fields) )
|
||||
$value = (int) $value;
|
||||
|
||||
|
|
Loading…
Reference in New Issue