Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #38700, comment 10


Ignore:
Timestamp:
11/08/2016 10:36:46 PM (8 years ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38700, comment 10

    initial v1  
    55I disagree that discarding the return value is a viable option here, it's not. At the very minimum those two checks should be performed, and then a `false === $wp_update_comment_return` should also be added which returns the current error.
    66
    7 [attachment:38700.wp-error.diff] is the changed needed to `wp_update_comment()` so you can disambiguate the errors (and also fixes the incorrect PHPDoc to show how wild the return values are - "0 or 1 on success, 0.. on failure"), if others feel that it's worth pushing ahead here and that it's the most important thing to do, this is the route I'd suggest taking when no compromise is being made. `wp_update_comment()` really needs a make over.
     7[attachment:38700.wp-error.diff] is the changed needed to `wp_update_comment()` so you can disambiguate the errors (and also fixes the incorrect PHPDoc to show how wild the return values are - "0 or 1 on success, 0.. on failure"), if others feel that it's worth pushing ahead here and that it's the most important thing to do, this is the route I'd suggest taking when no compromise is being made. `wp_update_comment()` really needs a make over. ([attachment:38700.wp-error.2.diff] is what the return values should be updated to, but IMHO is too late in the beta cycle)