[wp-trac] [WordPress Trac] #34997: preprocess_comment filter does not contain old user_ID field for user_id, instead it has new user_id field
WordPress Trac
noreply at wordpress.org
Fri Dec 11 12:19:51 UTC 2015
#34997: preprocess_comment filter does not contain old user_ID field for user_id,
instead it has new user_id field
-------------------------------------------+--------------------
Reporter: cookiesowns | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4.1
Component: Comments | Version: 4.4
Severity: normal | Resolution:
Keywords: reporter-feedback needs-patch | Focuses:
-------------------------------------------+--------------------
Changes (by johnbillion):
* focuses: docs =>
* severity: major => normal
* version: 4.0 => 4.4
* milestone: Awaiting Review => 4.4.1
* keywords: reporter-feedback => reporter-feedback needs-patch
Old description:
> in comments.php, line 1680, the old {{{ $commentdata['user_ID'] }}} field
> is not being set.
>
> As a result, all old filters using the old field name in
> preprocess_comment filter will not have the proper parameter set.
>
> I'm not sure what to do in this case, but we should update the PHPDOC
> above on line 1656 as $user_ID technically doesn't exist anymore..
>
> Should we set both fields when passing through to preprocess_comment or?
New description:
in wp-includes/comment.php, line 1680, the old {{{ $commentdata['user_ID']
}}} field is not being set.
As a result, all old filters using the old field name in
preprocess_comment filter will not have the proper parameter set.
I'm not sure what to do in this case, but we should update the PHPDOC
above on line 1656 as $user_ID technically doesn't exist anymore..
Should we set both fields when passing through to preprocess_comment or?
--
Comment:
Culprit: [35435].
The workaround is to switch to the `user_id` field instead of `user_ID`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34997#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list