Sanitize post_author and comment_count as integer fields. props GeertDD. fixes #22324.

git-svn-id: https://develop.svn.wordpress.org/trunk@23353 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-01-28 04:17:05 +00:00
parent 44c8e7aea8
commit 9a00a0dcce
1 changed files with 1 additions and 1 deletions

View File

@ -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;