Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #39732, comment 35


Ignore:
Timestamp:
01/23/2020 10:05:03 PM (5 years ago)
Author:
imath
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39732, comment 35

    initial v1  
    33I've updated the patch to current trunk and made the following edits in [https://core.trac.wordpress.org/attachment/ticket/39732/39732.9.patch 39732.9.patch]
    44
    5 1. I think it's safer to return what was used before if the `$wp_error` argument is true. That is to say `0`.
     51. I think it's safer to return what was used before if the `$wp_error` argument is false. That is to say `0`.
    662. I've edited what was done for the `'wp_update_comment_data'` as I believe the WP_Error object never makes its way there as it is returned, so we must keep the comment `$data` unchanged. I believe it is better to pass the `$wp_error` argument to inform the plugin what type of return is expected if it's needed to stop the update process.
    773. I believe it's wrong to return an error if the comment data has not changed because it prevents the comment meta update. So I removed the code you added after the `$wpdb->update()` part.