Changeset 28915 for trunk/src/wp-includes/comment.php
- Timestamp:
- 06/30/2014 12:40:51 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r28895 r28915 1743 1743 */ 1744 1744 function wp_new_comment( $commentdata ) { 1745 if ( isset( $commentdata['user_ID'] ) ) { 1746 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 1747 } 1748 $prefiltered_user_id = $commentdata['user_id']; 1749 1745 1750 /** 1746 1751 * Filter a comment's data before it is sanitized and inserted into the database. … … 1753 1758 1754 1759 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 1755 if ( isset( $commentdata['user_ID']) )1760 if ( isset( $commentdata['user_ID'] ) && $prefiltered_user_id !== (int) $commentdata['user_ID'] ) { 1756 1761 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 1757 elseif ( isset($commentdata['user_id']) )1762 } elseif ( isset( $commentdata['user_id'] ) ) { 1758 1763 $commentdata['user_id'] = (int) $commentdata['user_id']; 1764 } 1759 1765 1760 1766 $commentdata['comment_parent'] = isset($commentdata['comment_parent']) ? absint($commentdata['comment_parent']) : 0;
Note: See TracChangeset
for help on using the changeset viewer.