[wp-trac] [WordPress Trac] #39380: wp_update_comment can cause database error with new filter
WordPress Trac
noreply at wordpress.org
Tue Dec 27 17:42:00 UTC 2016
#39380: wp_update_comment can cause database error with new filter
------------------------------+--------------------------
Reporter: dshanske | Owner: rachelbaker
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.1
Component: Comments | Version: 4.6
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+--------------------------
Comment (by rachelbaker):
In [changeset:"39641"]:
{{{
#!CommitTicketReference repository="" revision="39641"
Comments: Fix placement of the wp_update_comment_data filter to safeguard
filtered data from triggering a database error.
Introduced in [38674], the wp_update_comment_data filter took place after
the $data was sliced and prepared for the database update statement. The
location of the filter assumed the result of anyone applying it would not
change the data type or make structural modifications or additions to the
$data array. 😅
This moves the wp_update_comment_data filter to take place before the
$data is sliced and prepared for the database update statement.
Merges [39640] to the 4.7 branch.
Props dshanske for initial patch.
Fixes #39380.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39380#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list