[wp-trac] [WordPress Trac] #23231: preprocess_comment should get the normalised comment data
WordPress Trac
noreply at wordpress.org
Thu May 29 04:47:18 UTC 2014
#23231: preprocess_comment should get the normalised comment data
-------------------------------------------------+-----------------------
Reporter: westi | Owner: dkotter
Type: defect (bug) | Status: assigned
Priority: low | Milestone: 4.0
Component: Comments | Version: 3.5
Severity: minor | Resolution:
Keywords: westi-like has-patch good-first-bug | Focuses:
-------------------------------------------------+-----------------------
Comment (by nacin):
This is exactly what I was envisioning. The patch is perfect. I did
however catch an odd situation. Imagine:
* Function is passed user_id 1
* Filter sets user_ID 2
With the current code, the function takes user_ID 2 and overrides user_id
1 with it. With the patched code, the function will end up with user_id 1.
By normalizing user_id we lose the fact that user_ID could have been set
by the filter.
(Also, with the initial patch, a user_ID would have become a user_id, then
have been passed to the filter. The original user_ID will then override
any changes the filter makes to user_id.)
I'll be honest, I don't entirely care about breaking this, but we still
probably shouldn't. Open to suggestions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23231#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list