[wp-trac] [WordPress Trac] #38700: REST API: Cannot send an empty or no-op comment update
WordPress Trac
noreply at wordpress.org
Tue Jun 30 13:59:37 UTC 2020
#38700: REST API: Cannot send an empty or no-op comment update
-------------------------------------------------+-------------------------
Reporter: jnylen0 | Owner: jnylen0
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.1
Component: REST API | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
fixed-major |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:10 dd32]:
> [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)
Follow-up: #39732
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38700#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list