[wp-trac] [WordPress Trac] #39730: Checking if wp_new_comment() return value is a WP_Error
WordPress Trac
noreply at wordpress.org
Mon Sep 25 07:28:59 UTC 2017
#39730: Checking if wp_new_comment() return value is a WP_Error
---------------------------------------+------------------
Reporter: enrico.sorcinelli | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Comments | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch has-screenshots | Focuses:
---------------------------------------+------------------
Comment (by peterwilsoncc):
Taking a quick look at the latest patch, I have a few comments:
* In `wp-admin/includes/ajax-actions.php`
* can you use `wp_send_json_error()` instead of `wp_die()`
* in `tests/phpunit/tests/ajax/ReplytoComment.php`
* there is no need to remove the filter during `tearDown()`, the WP test
suite does this automatically
* Can you add an docblock to `test_pre_comments_approved()`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39730#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list